npm.io
2.10.0 • Published 2 weeks ago

@opentelemetry/propagator-jaeger

Licence
Apache-2.0
Version
2.10.0
Deps
1
Size
69 kB
Vulns
0
Weekly
0
Stars
3.4K

OpenTelemetry Propagator Jaeger

NPM Published Version Apache License

Deprecated: The Jaeger propagator is deprecated by the OpenTelemetry specification in favor of the W3C TraceContext propagator. Use W3CTraceContextPropagator from @opentelemetry/core instead. This package will be removed in a future major release.

OpenTelemetry Jaeger propagator provides HTTP header propagation for systems that are using Jaeger HTTP header format.

Format: {trace-id}:{span-id}:{parent-span-id}:{flags}

  • {trace-id}

    • 64-bit or 128-bit random number in base16 format.
    • Can be variable length, shorter values are 0-padded on the left.
    • Value of 0 is invalid.
  • {span-id}

    • 64-bit random number in base16 format.
  • {parent-span-id}

    • Set to 0 because this field is deprecated.
  • {flags}

    • One byte bitmap, as two hex digits.

Example of usage:

const { propagation } = require('@opentelemetry/api');
const { JaegerPropagator } = require('@opentelemetry/propagator-jaeger');

const propagator = new JaegerPropagator();
propagation.setGlobalPropagator(propagator);

Baggage Notes

Jeager Baggage is represented as multiple headers where the names are carrier dependent. For this reason, they are omitted from the fields method. This behavior should be taken into account if your application relies on the fields functionality. See the specification for more details.

Trace on Jaeger UI

example image

License

Apache 2.0 - See LICENSE for more information.

Keywords