The raw log records to transform. May be empty.
Field-mapping configuration. The four fields
traceIdField, spanNameField, serviceNameField, and
timestampField are required by the type.
OTel TraceData ready for TraceTree.build (from trace-tree.ts)
or for passing to the traceData setter on <trace-visualizer>.
Convert an array of arbitrary log records into OpenTelemetry-shaped TraceData.
This is the entry point of the log-to-trace pipeline that the
<trace-visualizer>component uses internally when given raw logs via thelogDatasetter. It is also exported for callers that want to perform the transformation up-front.The transform runs in five phases:
config.traceIdField.config.spanGroupFields(composite key) or, if absent, treat each log as its own span keyed byconfig.spanIdField.spanNameField), start/end timestamps fromtimestampField/endTimeField, status fromstatusCodeField, kind fromspanKindRules/defaultSpanKind, and one OTelEventper source log.parentSpanLookupFieldsis set, link spans whose lookup values match another span's leading composite-key components, preferring an encompassing parent and falling back to the latest span starting before the child.serviceNameField.Trace and span IDs are deterministic (DJB2-derived hex), so re-running the transform on the same input yields identical IDs.