Last updated: March 30, 2026
Convert Span Events to Log Records
OpenTelemetry is deprecating span events in favor of log records linked with trace context. Dash0 provides a per-dataset option to automatically convert span events into correlated log records during ingestion.
Why convert span events to logs?
Span events are tightly coupled to the span lifecycle: they share the span's retention, cannot be queried independently, and are subject to per-span limits (e.g., a maximum of 8 span events per span, 8 attributes per event). Converting them to log records removes these constraints and brings benefits:
- Independent queryability — Converted log records appear in the Logs view and can be filtered, grouped, and alerted on like any other log record.
- No per-span limits — The 8-events-per-span cap no longer applies; every event becomes its own log record.
Enable the conversion
The conversion is controlled per dataset. Navigate to Settings > Datasets, select the dataset, and enable the Convert span events toggle under the Convert Span Events to Logs section.
When the option is enabled:
- Every span event on ingested traces is converted into an independent log record.
- The original span events are removed from the spans before storage to avoid double-counting.
- The original spans continue through the pipeline unchanged (apart from the removed events).
When the option is disabled (the default for existing datasets), span events are stored as part of the span as before.
How span events are mapped to log records
Each span event produces one log record with the following mapping:
| Span event field | Log record field | Notes |
|---|---|---|
| Event name | Body (string) | The event name becomes the log body |
| Event timestamp | Timestamp | Preserved as-is |
| Parent span start time | ObservedTimestamp | Set to the parent span's start time |
| Event attributes | Attributes | Copied as-is |
Parent span TraceID | TraceID | Maintains trace correlation |
Parent span SpanID | SpanID | Maintains span correlation |
| Parent span resource | Resource | Inherited from the span's resource scope |
| — | Scope name | Set to the connector's instrumentation scope |
| — | dash0.span_event.converted | Set to true to identify converted log records |
| — | SeverityNumber | Set to 17 (ERROR severity range) when the event has exception.* attributes; unset otherwise |
| — | SeverityText | Not set (left empty for all converted events) |
Query converted log records
Converted log records can be queried like any other log record.
Use the dash0.span_event.converted attribute to filter specifically for records that originated from span events:
1dash0.span_event.converted:true
Since the TraceID and SpanID are preserved, converted log records remain correlated with their parent span and appear in the Events & Logs tab of the span detail sidebar.
Impact on synthetic metrics
When span event conversion is enabled, the converted events contribute to the dash0.logs synthetic metric instead of the dash0.span.events metric.
Keep this in mind when reviewing dashboards or alert rules that reference these metrics.