A lightweight wrapper around the Jaeger client (opentracing) that simplifies tracing setup and span management for Node.js services. Current stable version is 1.0.1 (last updated 2020). It provides a simple API to initialize the tracer, start spans, and inject/extract context for distributed tracing. This package is a thin layer over the official jaeger-client library, intended for quick integration but may lack flexibility for advanced use cases. No breaking changes documented; the package relies on opentracing as a peer dependency. Compared to the official jaeger-client, it reduces boilerplate but hides configuration options like sampling and reporter settings.
npm install jaeger-client-utilityNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Initializes Jaeger tracer, starts a span, and demonstrates distributed tracing with injection and extraction.
Use the official jaeger-client directly if you need custom sampler or agent location.
Consider migrating to OpenTelemetry-based instrumentation.
Install @types/opentracing and create a declaration file: declare module 'jaeger-client-utility';
Replace `const client = new JaegerClient()` with `import jaegerClient from 'jaeger-client-utility'` and use `jaegerClient.init()`.
Use ES import or `const jaegerClient = require('jaeger-client-utility').default;`Call `jaegerClient.init({ serviceName: 'your-service' })`Add `import { FORMAT_HTTP_HEADERS } from 'opentracing';`