Interceptor for wrapping the browser's Fetch API with Zipkin distributed tracing. Version 0.22.0 is the last release of the legacy 0.x line; the package is deprecated in favor of `@zipkin.js/instrumentation-fetch` in the 0.23+ rewrite. It wraps `window.fetch` or a fetch polyfill to automatically propagate trace context via headers and record spans. Key differentiator: designed specifically for Zipkin's JS tracer ecosystem, lightweight, and works in browser environments where fetch is available. Ideal for microservices frontends needing end-to-end tracing with Zipkin.
npm install zipkin-instrumentation-fetchNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Initializes a Zipkin tracer and wraps the global fetch function to automatically propagate trace context.
Replace import with 'import { ZipkinFetchInterceptor } from '@zipkin.js/instrumentation-fetch' and ensure compatible tracer version.Ensure fetched function conforms to the standard Request/Response API.
Use a fetch polyfill that supports clone or avoid streaming bodies.
Use default import: import ZipkinFetchInterceptor from 'zipkin-instrumentation-fetch'
Ensure new ZipkinFetchInterceptor({ tracer }) receives a valid tracer instance.Pass a bound fetch: fetchInterceptor.wrap(window.fetch.bind(window))
No dependency data recorded yet.