telemetry

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2026 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitTraceProvider

func InitTraceProvider(ctx context.Context, serviceName, serviceVersion string) (*trace.TracerProvider, error)

InitTraceProvider initializes OpenTelemetry trace provider Configuration is driven entirely by standard OpenTelemetry environment variables:

  • OTEL_EXPORTER_OTLP_ENDPOINT: OTLP collector endpoint (if not set, uses stdout)
  • OTEL_EXPORTER_OTLP_PROTOCOL: "grpc" (default) or "http/protobuf"
  • OTEL_TRACES_SAMPLER: sampler type (default: "parentbased_traceidratio")
  • OTEL_TRACES_SAMPLER_ARG: sampling rate 0.0-1.0 (default: 1.0)
  • OTEL_RESOURCE_ATTRIBUTES: additional resource attributes (k=v,k2=v2 format)
  • OTEL_PROPAGATORS: list of propagators to use (default: "tracecontext,baggage")

func Shutdown

func Shutdown(ctx context.Context, tp *trace.TracerProvider) error

Shutdown gracefully shuts down the trace provider

Types

This section is empty.

Jump to

Keyboard shortcuts

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