Documentation ¶
Index ¶
- Constants
- func AddSpanToAnyExisting(ctx context.Context, operation string, kvs ...interface{}) (opentracing.Span, context.Context)
- func CloseAndReportTraces()
- func FinishAnySpan(span opentracing.Span, kvs ...interface{})
- func InstallJaegerTracerFromEnv() string
- func IsActive() bool
- func StreamClientInterceptor() grpc.StreamClientInterceptor
- func StreamServerInterceptor() grpc.StreamServerInterceptor
- func TagAnySpan(spanBox interface{}, kvs ...interface{}) opentracing.Span
- func UnaryClientInterceptor() grpc.UnaryClientInterceptor
- func UnaryServerInterceptor() grpc.UnaryServerInterceptor
Constants ¶
const JaegerServiceName = "pachd"
JaegerServiceName is the name pachd (and the pachyderm client) uses to describe itself when it reports traces to Jaeger
const ShortTraceEnvVar = "PACH_TRACE"
ShortTraceEnvVar is what the client reads to decide whether to send a trace. Below, this is implemented by the span inclusion func addTraceIfTracingEnabled() (which is itself used by the GRPC interceptor)
Variables ¶
This section is empty.
Functions ¶
func AddSpanToAnyExisting ¶
func AddSpanToAnyExisting(ctx context.Context, operation string, kvs ...interface{}) (opentracing.Span, context.Context)
AddSpanToAnyExisting checks 'ctx' for Jaeger tracing information, and if tracing metadata is present, it generates a new span for 'operation', marks it as a child of the existing span, and returns it.
func CloseAndReportTraces ¶
func CloseAndReportTraces()
CloseAndReportTraces tries to close the global tracer, which, in the case of the Jaeger tracer, causes it to send any unreported traces to the collector
func FinishAnySpan ¶
func FinishAnySpan(span opentracing.Span, kvs ...interface{})
FinishAnySpan calls span.Finish() if span is not nil. Pairs with AddSpanToAnyExisting
func InstallJaegerTracerFromEnv ¶
func InstallJaegerTracerFromEnv() string
InstallJaegerTracerFromEnv installs a Jaeger client as the opentracing global tracer, relying on environment variables to configure the client
func IsActive ¶
func IsActive() bool
IsActive returns true if a connection to Jaeger has been established and a global tracer has been installed
func StreamClientInterceptor ¶
func StreamClientInterceptor() grpc.StreamClientInterceptor
StreamClientInterceptor returns a GRPC interceptor for non-streaming GRPC RPCs
func StreamServerInterceptor ¶
func StreamServerInterceptor() grpc.StreamServerInterceptor
StreamServerInterceptor returns a GRPC interceptor for non-streaming GRPC RPCs
func TagAnySpan ¶
func TagAnySpan(spanBox interface{}, kvs ...interface{}) opentracing.Span
TagAnySpan tags any span associated with 'spanBox' (which must be either a span itself or a context.Context) with 'kvs'
func UnaryClientInterceptor ¶
func UnaryClientInterceptor() grpc.UnaryClientInterceptor
UnaryClientInterceptor returns a GRPC interceptor for non-streaming GRPC RPCs
func UnaryServerInterceptor ¶
func UnaryServerInterceptor() grpc.UnaryServerInterceptor
UnaryServerInterceptor returns a GRPC interceptor for non-streaming GRPC RPCs
Types ¶
This section is empty.