Skip to main content
The profiler span tree can be exported as OpenTelemetry traces. Pass opentelemetryProfiler() as the source’s profiler option; every batch then produces a trace with one span per pipeline stage, viewable in Jaeger, Tempo, or any OTLP-compatible backend.
@opentelemetry/api is an optional peer dependency. The exporter setup below additionally uses the OTEL Node SDK:

Setup

The pipe change is a single option — swap profiler: true for opentelemetryProfiler():
The rest is one-time OTEL SDK bootstrap at process startup: wire the OTLP exporter, then flush spans before exit. The complete program:
To attach pipe spans to an existing trace (for example, when the pipe runs inside a request handler), pass an OTEL context:

Running Jaeger locally

Jaeger supports OTLP natively since v1.35:
Open http://localhost:16686 and search for the service name you configured (my-pipe above). Each batch appears as a trace; the span hierarchy matches the profiler tree: data fetch, transformers (including named decoder spans), and target stages. Full runnable example: 13.jaeger-tracing.example.ts.