Express middleware for distributed tracing with Zipkin.js. Version 0.22.0 is current stable, released as part of the openzipkin/zipkin-js monorepo with irregular release cadence. This package provides middleware that creates Zipkin spans for incoming HTTP requests to Express applications, automatically recording timing, tags, and annotations. Key differentiators: minimal configuration, tight integration with Zipkin's B3 propagation headers, support for custom sampler and tracer configurations. Suitable for Node.js Express apps requiring observability via Zipkin. Note: Not actively maintained (last release 0.22.0).
npm install zipkin-instrumentation-expressVerified import paths — ran on the pinned version, not inferred.
Sets up Zipkin tracing middleware for Express app using batch recorder and HTTP transport.
Use import instead of require() for all zipkin packages.
Ensure the middleware is applied before app.get(), app.post(), etc.
Provide localServiceName when creating Tracer instance.
Ensure Tracer is initialized with a valid sampler and recorder.
Call expressMiddleware({ tracer }) where tracer is a valid Zipkin Tracer instance.