Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
Provider holds all OTEL SDK providers and shuts them down gracefully. All methods are safe to call on a zero-value Provider (OTEL disabled).
func Setup ¶
func Setup( ctx context.Context, cfg config.OTelConfig, promReg *prometheus.Registry, svcVersion string, ) (*Provider, error)
Setup initialises OTEL TracerProvider, MeterProvider (bridged from the Prometheus registry), and LoggerProvider, then registers them as globals.
When cfg.Endpoint is empty all three signals remain as no-ops (the OTEL SDK default), and a zero-value Provider is returned.
func (*Provider) LogHandler ¶
LogHandler returns a slog.Handler that ships records to the OTEL LoggerProvider. Returns nil when OTEL is disabled.
Click to show internal directories.
Click to hide internal directories.