Skip to main content

Traces module · loader API

JaegerTraceLoader

Read Jaeger query responses, archives, embedded span arrays, and JSON Lines into the shared five-table OTLP Arrow projection.

What it returns

Normalize a provider-specific trace into shared tables.

JaegerTraceLoader keeps the Jaeger input boundary separate from the application model, returning the same relational Arrow projection used by OTLP and other trace formats.

Resources

Service and process context

Scopes

Instrumentation scope metadata

Spans

Timed operations and relationships

Events

Span events and links

Detailed guide

JaegerTraceLoader reference

The sections below document usage, parser access, options, batches, and the normalized trace result.

JaegerTraceLoader reads Jaeger query, archive, embedded-process span-array, and JSON Lines data. It returns the five-table OtlpTrace Arrow projection shared with the OTLP loaders.

Usage​

import {load} from '@loaders.gl/core';
import {JaegerTraceLoader} from '@loaders.gl/traces/jaeger';

const trace = await load('trace.jaeger.json', JaegerTraceLoader);

console.log(trace.resources);
console.log(trace.scopes);
console.log(trace.spans);
console.log(trace.events);
console.log(trace.links);

The package-root export is metadata-only. Direct parser access is available from the implementation subpath:

import {JaegerTraceLoaderWithParser} from '@loaders.gl/traces/jaeger';

Options​

OptionTypeDefaultDescription
jaegerTrace.batchSizenumber4096Maximum rows in each tagged Arrow record batch.

Batched Parsing​

import {parseInBatches} from '@loaders.gl/core';
import {JaegerTraceLoader} from '@loaders.gl/traces/jaeger';

const batches = await parseInBatches(chunks, JaegerTraceLoader, {
jaegerTrace: {batchSize: 1024}
});

for await (const batch of batches) {
consume(batch.table, batch.data);
}

JSON Lines documents are parsed and emitted incrementally. Pretty-printed JSON and multi-line Query API responses fall back to whole-document parsing because JSON object boundaries are not line delimited.

Detection and Errors​

The loader recognizes .jaeger.json and .jaeger.jsonl. Generic JSON MIME types are supported when the loader is selected explicitly. Invalid shapes, malformed hexadecimal IDs, and unsafe or negative timestamps throw parsing errors.