Documentation ¶
Overview ¶
Package otocadapter provides an interceptor to inject a OpenCensus span, derived from an OpenTracing span, to send it over gRPC to a service, which uses OpenCensus for tracing.
This implementation assumes, Jaeger tracing implementation is used.
Package otocadapter provides
Index ¶
Constants ¶
View Source
const (
OPENCENSUS_TRACE_KEY = "grpc-trace-bin"
)
View Source
const (
OPENTRACING_TRACE_ID_LENGTH = 8
)
Variables ¶
View Source
var (
ErrOTTraceIDLen = errors.New("expected OpenTracing trace ID with 8 bytes")
)
Functions ¶
func OpenCensusAdapterClientInterceptor ¶
func OpenCensusAdapterClientInterceptor(tracer opentracing.Tracer) grpc.UnaryClientInterceptor
OpenCensusAdapterClientInterceptor injects a OpenTracing span in an OpenCensus format into the context.
func OpenTracingSpanIDToOpenCensusSpanID ¶
Convert an OpenTracing SpanID to an OpenCensus SpanID.
func OpenTracingTracIDToOpenCensusTraceID ¶
Convert an OpenTracing TraceID to an OpenCensus TraceID.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.