Documentation
¶
Overview ¶
Package httptelemetry provides shared OpenTelemetry helpers for HTTP clients, including a toggleable RoundTripper wrapper that preserves the caller's base transport while emitting spans and metrics when enabled.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Transport ¶
type Transport struct {
// contains filtered or unexported fields
}
Transport implements http.RoundTripper with optional OpenTelemetry tracing.
func NewTransport ¶
func NewTransport(base http.RoundTripper) *Transport
NewTransport creates a new Transport. If base is nil, cloned http.DefaultTransport is used.
func NewTransportWithTrace ¶
func NewTransportWithTrace(base http.RoundTripper, traceEnabled bool) *Transport
NewTransportWithTrace creates a new *Transport with OpenTelemetry tracing.
If base is nil, cloned http.DefaultTransport is used.
Click to show internal directories.
Click to hide internal directories.