zipkin-instrumentation-grpc-client
GRPC client interceptor for Zipkin.
Usage
The library is a GRPC interceptor and can be used as:
const grpc = ;const protoLoader = ; const Tracer ExplicitContext ConsoleRecorder = ;const grpcInstrumentation = ; const PROTO_PATH = __dirname + '/protos/weather.proto';const PROTO_OPTIONS = keepCase: true enums: String defaults: true oneofs: true ; // setup zipkin tracerconst ctxImpl = ;const recorder = ;const localServiceName = 'service-a'; // name of this applicationconst tracer = ctxImpl recorder localServiceName; // setup grpc clientconst definition = protoLoader;const weather = grpcweather;const client = 'localhost:50051' grpccredentials; //setup interceptorconst remoteServiceName = 'weather-service';const interceptor = ; client;
The important snippet is:
const interceptor = ; client;