telemetry

package
v1.0.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2026 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractTraceContext

func ExtractTraceContext(next http.Handler) http.Handler

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

func WithTracingExecutor(inner execution.Executor) execution.Executor

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.

Directories

Path Synopsis
Package testutil provides test utilities for OpenTelemetry tracing tests.
Package testutil provides test utilities for OpenTelemetry tracing tests.

Jump to

Keyboard shortcuts

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