Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Enabled ¶
func Enabled() bool
Enabled returns true if OpenTelemetry tracing is active. Middleware should check this before doing any tracing work to avoid unnecessary overhead when tracing is disabled.
func InitTracer ¶
InitTracer initializes the OpenTelemetry tracer provider. Tracing is only enabled if OTEL_EXPORTER_OTLP_ENDPOINT is set. Check telemetry.Enabled() to determine if tracing is active.
func InitTracerWithConfig ¶
func InitTracerWithConfig(cfg *config.TelemetryConfig, serviceName, serviceVersion string) (func(), error)
InitTracerWithConfig initializes the OpenTelemetry tracer provider using the provided config. The config values can be overridden by environment variables. Check telemetry.Enabled() to determine if tracing is active.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.