Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitProvider ¶ added in v3.7.0
InitProvider sets up the global OTel TracerProvider and W3C TraceContext propagator.
If tracing is disabled or no endpoint is configured, the provider returned is just a nop.
The returned shutdown function must be called (e.g. via defer) to flush and stop the exporter.
Types ¶
type ProviderConfig ¶ added in v3.7.0
type ProviderConfig struct {
Enabled bool
Endpoint string // OTLP/gRPC endpoint, e.g. "localhost:4317"
Collector string // OTLP/HTTP collector URL, e.g. "http://localhost:4318"
ServiceName string
Log *zerolog.Logger
}
ProviderConfig holds the tracing configuration.
Click to show internal directories.
Click to hide internal directories.