Hanzo
OpenapiO11y

Runs the given log parsing pipelines over the given sample records without…

Runs the given log parsing pipelines over the given sample records without saving anything, and returns the transformed records plus whatever the…

POST /v1/o11y/logs/pipelines/preview

Addresshttps://api.hanzo.ai/v1/o11y/logs/pipelines/preview
MethodPOST
Operationpost_o11y_logs_pipelines_preview
AuthAuthorization: Bearer $HANZO_API_KEY

Runs the given log parsing pipelines over the given sample records without saving anything, and returns the transformed records plus whatever the collector logged while simulating them.

Callers need the viewer role; the runtime's own gate enforces it.

Request

78 fields, body application/json (required).

FieldInTypeRequiredDescription
logsbodyo11y.O11yLogRecord[]Logs are the sample records to transform.
logs[].attributes_boolbodyobjectAttributesBool are the record's boolean attributes.
logs[].attributes_bool.*bodyboolean
logs[].attributes_floatbodyobjectAttributesFloat are the record's float attributes.
logs[].attributes_float.*bodynumber
logs[].attributes_intbodyobjectAttributesInt are the record's integer attributes.
logs[].attributes_int.*bodyinteger
logs[].attributes_stringbodyobjectAttributesString are the record's string attributes.
logs[].attributes_string.*bodystring
logs[].bodybodystringBody is the record's body.
logs[].idbodystringID is the record's id.
logs[].resources_stringbodyobjectResourcesString are the record's string resource attributes.
logs[].resources_string.*bodystring
logs[].severity_numberbodyintegerSeverityNumber is the record's severity as a number.
logs[].severity_textbodystringSeverityText is the record's severity as text, e.g.
logs[].span_idbodystringSpanID is the span the record belongs to.
logs[].timestampbodyintegerTimestamp is the record's time as a nanosecond epoch.
logs[].trace_flagsbodyintegerTraceFlags are the record's trace flags.
logs[].trace_idbodystringTraceID is the trace the record belongs to.
pipelinesbodyo11y.O11yLogPipeline[]Pipelines are the pipelines to simulate, in order.
pipelines[].aliasbodystringAlias is the pipeline's short name.
pipelines[].configbodyo11y.O11yLogPipelineOperator[]Config is the pipeline's processors, in order.
pipelines[].config[].defaultbodystringDefault is the id of the processor a router falls through to.
pipelines[].config[].enable_flatteningbodybooleanEnableFlattening flattens parsed JSON one level when true.
pipelines[].config[].enable_pathsbodybooleanEnablePaths keeps the JSON path in flattened keys when true.
pipelines[].config[].enabledbodybooleanEnabled turns the processor on.
pipelines[].config[].exprbodystringExpr is a router route's expression.
pipelines[].config[].fieldbodystringField is the field an add/remove processor works on.
pipelines[].config[].fieldsbodystring[]Fields are the fields a retain processor keeps.
pipelines[].config[].frombodystringFrom is the source field of a move or copy.
pipelines[].config[].idbodystringID is the processor's id, unique within the pipeline.
pipelines[].config[].ifbodystringIf gates the processor on an expression.
pipelines[].config[].layoutbodystringLayout is a time parser's layout.
pipelines[].config[].layout_typebodystringLayoutType is the layout's kind, e.g.
pipelines[].config[].mappingbodyobjectMapping maps severity levels (or flattened keys) to the values that mean them.
pipelines[].config[].mapping.*bodystring[]
pipelines[].config[].namebodystringName is the processor's display name.
pipelines[].config[].on_errorbodystringOnError says what to do when the processor fails, e.g.
pipelines[].config[].orderIdbodyintegerOrderID is the processor's 1-based position in the pipeline.
pipelines[].config[].outputbodystringOutput is the id of the processor that runs next.
pipelines[].config[].overwrite_textbodybooleanOverwriteSeverityText rewrites the severity text alongside the number when true.
pipelines[].config[].parse_frombodystringParseFrom is where a parser reads from.
pipelines[].config[].parse_tobodystringParseTo is where a parser writes its result.
pipelines[].config[].path_prefixbodystringPathPrefix prefixes flattened keys.
pipelines[].config[].patternbodystringPattern is a grok parser's pattern.
pipelines[].config[].regexbodystringRegex is a regex parser's expression.
pipelines[].config[].routesbodyo11y.O11yLogPipelineRoute[]Routes are a router processor's routes.
pipelines[].config[].routes[].exprbodystringExpr is the expression that selects the route.
pipelines[].config[].routes[].outputbodystringOutput is the id of the processor the route sends to.
pipelines[].config[].span_idbodyo11y.O11yLogParseFrom
pipelines[].config[].span_id.parse_frombodystringParseFrom is the field to read.
pipelines[].config[].tobodystringTo is the destination field of a move or copy.
pipelines[].config[].trace_flagsbodyo11y.O11yLogParseFrom
pipelines[].config[].trace_flags.parse_frombodystringParseFrom is the field to read.
pipelines[].config[].trace_idbodyo11y.O11yLogParseFrom
pipelines[].config[].trace_id.parse_frombodystringParseFrom is the field to read.
pipelines[].config[].typebodystringType is the processor type, e.g.
pipelines[].config[].valuebodystringValue is the value an add processor writes.
pipelines[].createdAtbodystring (date-time)CreatedAt is when the pipeline was created.
pipelines[].createdBybodystringCreatedBy is the id of who created the pipeline.
pipelines[].descriptionbodystringDescription says what the pipeline is for.
pipelines[].enabledbodybooleanEnabled says whether the pipeline is on.
pipelines[].filterbodyo11y.O11yLogFilter
pipelines[].filter.itemsbodyo11y.O11yLogFilterItem[]Items are the predicates.
pipelines[].filter.items[].keybodyo11y.O11yLogFilterKey
pipelines[].filter.items[].key.dataTypebodystringDataType is the field's data type, e.g.
pipelines[].filter.items[].key.isColumnbodybooleanIsColumn marks a field materialized as its own column.
pipelines[].filter.items[].key.isJSONbodybooleanIsJSON marks a path into the record's JSON body.
pipelines[].filter.items[].key.keybodystringKey is the field's name.
pipelines[].filter.items[].key.typebodystringType is where the field lives: tag or resource.
pipelines[].filter.items[].opbodystringOp is the comparison, e.g.
pipelines[].filter.items[].valuebodyanyValue is what it tests against, in the value's own JSON type.
pipelines[].filter.opbodystringOp combines the items: AND or OR.
pipelines[].idbodystringID is the pipeline's id.
pipelines[].namebodystringName is the pipeline's display name.
pipelines[].orderIdbodyintegerOrderID is the pipeline's 1-based position in the set.
pipelines[].updatedAtbodystring (date-time)UpdatedAt is when the pipeline last changed.
pipelines[].updatedBybodystringUpdatedBy is the id of who last changed it.

Response

StatusBodyMeaning
200o11y.O11yLogPipelinePreviewOutok

200 body — 22 fields.

FieldInTypeAlwaysDescription
databodyo11y.O11yLogPipelinePreview
data.collectorLogsbodystring[]CollectorLogs is what the collector logged while simulating.
data.logsbodyo11y.O11yLogRecord[]Logs are the sample records after the pipelines ran over them.
data.logs[].attributes_boolbodyobjectAttributesBool are the record's boolean attributes.
data.logs[].attributes_bool.*bodyboolean
data.logs[].attributes_floatbodyobjectAttributesFloat are the record's float attributes.
data.logs[].attributes_float.*bodynumber
data.logs[].attributes_intbodyobjectAttributesInt are the record's integer attributes.
data.logs[].attributes_int.*bodyinteger
data.logs[].attributes_stringbodyobjectAttributesString are the record's string attributes.
data.logs[].attributes_string.*bodystring
data.logs[].bodybodystringBody is the record's body.
data.logs[].idbodystringID is the record's id.
data.logs[].resources_stringbodyobjectResourcesString are the record's string resource attributes.
data.logs[].resources_string.*bodystring
data.logs[].severity_numberbodyintegerSeverityNumber is the record's severity as a number.
data.logs[].severity_textbodystringSeverityText is the record's severity as text, e.g.
data.logs[].span_idbodystringSpanID is the span the record belongs to.
data.logs[].timestampbodyintegerTimestamp is the record's time as a nanosecond epoch.
data.logs[].trace_flagsbodyintegerTraceFlags are the record's trace flags.
data.logs[].trace_idbodystringTraceID is the trace the record belongs to.
statusbodystringStatus is "success".

Failure carries the platform error shape — see Errors.

Examples

hanzo o11y logs pipelines preview

O11y API · All Hanzo APIs · Interactive reference

How is this guide?

On this page