Documentation
¶
Overview ¶
Package webhookotel adapts secret-safe webhook observations to the telemetry runtime.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrInvalidConfig = errors.New("webhook/otel: telemetry runtime is required")
var ErrInvalidHTTPClient = errors.New("webhook/otel: runtime, client, and explicit transport are required")
ErrInvalidHTTPClient means telemetry could not be composed without discarding the caller's explicit transport policy.
Functions ¶
func InstrumentHTTPClient ¶
func InstrumentHTTPClient(runtime *telemetry.Runtime, client *http.Client, operation string) (*http.Client, error)
InstrumentHTTPClient clones client and wraps its existing transport with telemetry tracing, metrics, and propagation. Requiring an explicit base transport prevents accidentally replacing a secure SSRF-aware transport with http.DefaultTransport.
Types ¶
type Observer ¶
type Observer struct {
// contains filtered or unexported fields
}
Observer records one bounded counter and duration measurement per webhook observation and adds an event to an already-active span. It never creates attributes from payloads, URLs, headers, IDs, keys, signatures, or errors.