Documentation
¶
Overview ¶
Package otelutil is plumbing shared by the tracing and metrics services: exporter registry, otlp config, HTTP semconv helpers.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ProtocolVersion ¶ added in v0.6.15
ProtocolVersion spells semconv's "1.1", "2", "3", not Go's "HTTP/2.0".
func RequestMethod ¶ added in v0.6.15
func RequestMethod(method string) httpconv.RequestMethodAttr
RequestMethod is case-sensitive: anything outside the known set (including "get") is _OTHER, so clients cannot mint new series.
Types ¶
type Config ¶
type Config struct {
Endpoint string `yaml:"endpoint"` // host:port, no scheme
Insecure bool `yaml:"insecure"`
Headers map[string]string `yaml:"headers"`
Compression string `yaml:"compression"` // "gzip", or ""/"none"
Timeout Duration `yaml:"timeout"`
Retry *Retry `yaml:"retry"`
}
Config is the transport-agnostic otlp config; a zero field keeps the exporter's default. grpc/http-typed knobs belong in an app-registered Factory instead.
type Registry ¶
type Registry[F any] struct { // contains filtered or unexported fields }
Registry is safe for concurrent use; a failed Lookup names the blank-import that would provide it.