Documentation
¶
Overview ¶
Package client_tracing provides HTTP client middleware for distributed tracing.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// Provider is the tracer provider used to create tracers.
Provider tracing.TracerProvider
// Propagator is the text map propagator for context propagation.
Propagator tracing.Propagator
// EnableHttpTracing enables detailed HTTP client tracing using otelhttptrace.
EnableHttpTracing bool
}
Config holds the configuration for the HTTP client tracing middleware.
func (Config) Middleware ¶
func (c Config) Middleware() httpcli.Middleware
Middleware returns an HTTP client middleware that creates spans for outgoing requests. It injects trace context into request headers, creates a client span, and records response status and errors. If the provider is a no-op, it returns a pass-through middleware.
Click to show internal directories.
Click to hide internal directories.