tracing

package
v0.12.3 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2024 License: MIT Imports: 19 Imported by: 0

Documentation

Overview

Package tracing is responsible for forwarding and translating span headers for internal requests

Index

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 HTTPMiddleware

func HTTPMiddleware(h http.Handler) http.Handler

func HeaderMatcher

func HeaderMatcher(key string) (string, bool)

HeaderMatcher ensures that open tracing headers x-b3-* are forwarded to output requests

func New

func New(service string, host string, zipkinEndpoint string) io.Closer

New initialises tracing uses zipkin client tracer

func NewFromEnv

func NewFromEnv(service string, host string, endpointVar, disableVar string) io.Closer

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 NewSpanContext(ctx context.Context, operationName string) (opentracing.Span, context.Context)

func NewTracer

func NewTracer() io.Closer

func StartSpanFromContext

func StartSpanFromContext(ctx context.Context, name string, options ...opentracing.StartSpanOption) (opentracing.Span, context.Context)

func TraceIDFromContext

func TraceIDFromContext(ctx context.Context) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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