grpc-interceptor-opentracing is an OpenTracing interceptor for gRPC Node.js servers that automatically creates and propagates spans for each gRPC call. Version 1.3.1 (stable) uses the experimental gRPC interceptor API from @grpc/grpc-js. It chains spans on existing contexts and reports them on call completion. Requires the opentracing package (v0.14) and an OpenTracing-compatible tracer like Jaeger. Unlike manual instrumentation, it provides automatic tracing with minimal configuration. The library is ESM-only and intended for use with the experimental server interceptor pattern (gRPC >=1.24).
npm install grpc-interceptor-opentracingNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates a gRPC server with automatic OpenTracing spans via the interceptor. Requires @grpc/grpc-js and opentracing.
Upgrade to @grpc/grpc-js >=1.24 or use the @grpc/proto-loader interceptor alternative.
For client-side tracing, use a separate instrumented client or apply the interceptor on the client side.
Consider migrating to opentracing instrumentation using the new gRPC API, such as @opentracing/instrumentation-grpc.
Always provide a tracer instance, or ensure a global tracer has been initialized before using the interceptor.
If you need no new root spans, ensure your application passes an active span context.
Run 'npm install grpc-interceptor-opentracing' and use import/require correctly.
Use import statement: 'import opentracing from "grpc-interceptor-opentracing";' or in CommonJS: 'const opentracing = require("grpc-interceptor-opentracing").default;'Either pass a tracer in options: 'opentracing({ tracer })' or initialize a global tracer via opentracing.initGlobalTracer().Upgrade to @grpc/grpc-js >=1.24 which supports server.use() experimental interceptor.