tracing

package
v2.9.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 8, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const JaegerServiceName = "pachd"

JaegerServiceName is the name pachd (and the pachyderm client) uses to describe itself when it reports traces to Jaeger

View Source
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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL