Documentation ¶
Overview ¶
Package tracing is responsible for forwarding and translating span headers for internal requests
Index ¶
- Constants
- func GRPCDialTracingOptions() []grpc.DialOption
- func HTTPMiddleware(h http.Handler) http.Handler
- func HeaderMatcher(key string) (string, bool)
- func New(service string, host string, zipkinEndpoint string) io.Closer
- func NewFromEnv(service string, host string, endpointVar, disableVar string) io.Closer
- func NewSpanContext(ctx context.Context, operationName string) (opentracing.Span, context.Context)
- func NewTracer() io.Closer
- func StartSpanFromContext(ctx context.Context, name string, options ...opentracing.StartSpanOption) (opentracing.Span, context.Context)
- func TraceIDFromContext(ctx context.Context) string
Constants ¶
View Source
const (
TraceID = prefixTracerState + "traceid"
)
Variables ¶
This section is empty.
Functions ¶
func GRPCDialTracingOptions ¶
func GRPCDialTracingOptions() []grpc.DialOption
GRPCDialTracingOptions returns DialOption enabling open tracing for grpc connections
func HeaderMatcher ¶
HeaderMatcher ensures that open tracing headers x-b3-* are forwarded to output requests
func NewFromEnv ¶
NewFromEnv initialises tracing and returns a closer if tracing is configured. If the necessary configuration is not available it is Fatal unless disableVar is set and is truthy (strconf.ParseBool -> true). If tracing is disabled returns nil
func NewSpanContext ¶
func StartSpanFromContext ¶
func StartSpanFromContext(ctx context.Context, name string, options ...opentracing.StartSpanOption) (opentracing.Span, context.Context)
func TraceIDFromContext ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.