Library to instrument the axios HTTP client with Zipkin distributed tracing. Version 0.22.0 is the latest stable release, part of the openzipkin/zipkin-js monorepo. It wraps axios to automatically create and propagate trace headers for outgoing requests. Compared to other Zipkin instrumentations, it is specific to axios and requires both zipkin and axios as peer dependencies. Release cadence is tied to the zipkin-js monorepo; updates are infrequent but stable. Supports ESM and CommonJS via the npm package.
npm install zipkin-instrumentation-axiosjsNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to wrap axios with Zipkin tracing using a console recorder. Replace ConsoleRecorder with an actual Zipkin transport for production.
Use a separate axios instance for instrumented vs non-instrumented requests.
Use latest zipkin API if available, or ignore if no other context implementation is provided.
Ensure both 'zipkin' and 'axios' are installed and a compatible version.
Upgrade Node.js to 10 or later.
Pass an explicit context like ExplicitContext or the CLI context.
Use 'import wrapAxios from ...' or 'const wrapAxios = require(...)'
Run 'npm install zipkin axios' to install required dependencies.
Provide a recorder (e.g., BatchRecorder or ConsoleRecorder) to the Tracer constructor.