Documentation
¶
Index ¶
- func ExtractTraceContext(next http.Handler) http.Handler
- func InitTracing(ctx context.Context, cfg *config.InstrumentationConfig, logger zerolog.Logger) (func(context.Context) error, error)
- func NewPropagatingHTTPClient(base http.RoundTripper) *http.Client
- func WithTracingExecutor(inner execution.Executor) execution.Executor
- func WithTracingSequencer(inner coresequencer.Sequencer) coresequencer.Sequencer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractTraceContext ¶
ExtractTraceContext returns HTTP middleware that extracts W3C Trace Context headers (traceparent, tracestate) from incoming requests and adds them to the request context. This enables spans created downstream to be children of the caller's trace.
func InitTracing ¶
func InitTracing(ctx context.Context, cfg *config.InstrumentationConfig, logger zerolog.Logger) (func(context.Context) error, error)
InitTracing initializes a global OpenTelemetry tracer provider if enabled. Returns a shutdown function that should be called on process exit.
func NewPropagatingHTTPClient ¶
func NewPropagatingHTTPClient(base http.RoundTripper) *http.Client
NewPropagatingHTTPClient returns an http.Client whose Transport injects W3C Trace Context headers (traceparent, tracestate) from the request context.
func WithTracingExecutor ¶
WithTracingExecutor decorates an Executor with OpenTelemetry spans.
func WithTracingSequencer ¶
func WithTracingSequencer(inner coresequencer.Sequencer) coresequencer.Sequencer
WithTracingSequencer decorates the provided Sequencer with tracing spans.
Types ¶
This section is empty.