grpc-ecosystem / grpc-opentracing

OpenTracing is a set of consistent, expressive, vendor-neutral APIs for distributed tracing and context propagation
BSD 3-Clause "New" or "Revised" License
472 stars 98 forks source link

OpenTracing support for grpc-java #2

Closed kcamenzind closed 8 years ago

kcamenzind commented 8 years ago

This PR provides support for OpenTracing in gRPC-java clients and servers.

Purpose Distributed tracing has become increasingly important to gain visibility into the application stack, since distributed systems (such as ones that use gRPC) propagate requests across process boundaries. OpenTracing is a set of consistent, expressive, vendor-neutral APIs for distributed tracing and context propagation, and by providing support for OpenTracing in gRPC, we make it easy for developers to trace their gRPC requests.

Usage This package allows gRPC-java users to trace client calls and server responses by adding a ClientTracingInterceptor and ServerTracingInterceptor to their clients and servers respectively. We also utilize the io.grpc.Context to allow users to gain access to the current span during server-side request handling, in order to continue the trace further into the application stack.

In order to actually produce a trace, developers can bind OpenTracing to any tracing implementation that uses a span model (such as Uber's Jaeger Bindings, an open-source Zipkin-compatible tracer).

Next Steps

Any comments on this implementation are welcome. We'd also like to know whether gRPC wants to host these artifacts, or whether we should publish them under io.opentracing.contrib.grpc.

bhs commented 8 years ago

cc @zinuga: how should we proceed with this? We don't have commit rights to the repo... Thanks.

zinuga commented 8 years ago

@bensigelman and @kcamenzind I have invited you to join grpc-opntracing-team and the team has admin writes to this repo.

bhs commented 8 years ago

Looks excellent! Merging. Thanks again for all of your work on this.