telemetry

package
v0.0.60 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 1, 2026 License: Apache-2.0 Imports: 16 Imported by: 0

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

func InitTracer(serviceName, serviceVersion string) (func(), error)

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL