Documentation
¶
Overview ¶
Package tracing provides OpenTelemetry tracing integration for httpx.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Transport ¶
type Transport struct {
// Tracer is the OTel tracer to use. Defaults to the global tracer.
Tracer trace.Tracer
// Propagator is the text map propagator. Defaults to the global propagator.
Propagator propagation.TextMapPropagator
// Base is the underlying transport.
Base http.RoundTripper
// SpanNameFormatter formats the span name from the request.
// Default: "HTTP <METHOD>"
SpanNameFormatter func(req *http.Request) string
}
Transport wraps an http.RoundTripper with OpenTelemetry tracing. It creates a child span for each request and propagates trace context headers.
Click to show internal directories.
Click to hide internal directories.