Skip to main content

Set Trace Context

Overview

The Set Trace Context processor reads trace and span identifiers from logs and sets trace_id and span_id for correlation.

This enables log-to-trace linking in downstream observability and investigation tools.

Supported types: Logs

Configuration

ParameterTypeDefaultRequiredDescription
field_typestringYesSource type for IDs: attribute, body, or resource.
trace_id_fieldstringNoField containing 32-char hex trace ID.
span_id_fieldstringNoField containing 16-char hex span ID.

At least one of trace_id_field or span_id_field should be configured.

Example Configuration

{
"field_type": "attribute",
"trace_id_field": "trace_id",
"span_id_field": "span_id"
}