Traces module · writer API
JaegerTraceWriter
Convert the shared five-table OTLP Arrow projection into Jaeger query responses or span-array JSON.
What it writes
Export normalized trace data to Jaeger’s shapes.
JaegerTraceWriter reconstructs provider-facing process and span relationships from the shared Arrow tables, with an option for the Query API envelope or raw span arrays.
Input
The five-table OTLP Arrow projection
Query
Trace IDs grouped with process maps
Spans
Raw spans with embedded processes
Validation
Relationships checked before encoding
Detailed guide
JaegerTraceWriter reference
The sections below document usage, output shapes, formatting options, and reconstruction behavior.
JaegerTraceWriter converts the five-table OtlpTrace Arrow projection into Jaeger JSON.
Usage
import {encode, load} from '@loaders.gl/core';
import {JaegerTraceLoader, JaegerTraceWriter} from '@loaders.gl/traces/jaeger';
const trace = await load('trace.jaeger.json', JaegerTraceLoader);
const queryResponse = await encode(trace, JaegerTraceWriter, {
jaegerTrace: {shape: 'query', space: 2}
});
Options
| Option | Type | Default | Description |
|---|---|---|---|
jaegerTrace.shape | 'query' | 'spans' | 'query' | Emit a Query API response or a raw span array with embedded processes. |
jaegerTrace.space | number | 0 | Spaces used to pretty-print JSON. Values are clamped by JSON.stringify. |
The Query API shape groups spans by trace ID and emits process descriptors in each trace's
processes map. The span-array shape copies each referenced process onto its span, which is useful
for archive and interchange tools that do not consume the Query API envelope.
The writer validates the normalized Arrow relationships through the shared OTLP reconstruction path before converting them. See the Jaeger format page for mappings and known fidelity limits.