telemetry

package
v0.116.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init(ctx context.Context, serviceName, serviceVersion string) func(context.Context) error

Init configures the global OpenTelemetry tracer provider. The exporter is selected via OTEL_TRACES_EXPORTER / OTEL_EXPORTER_OTLP_ENDPOINT. On any error, tracing is silently disabled — it must never block updatecli.

func RecordSpanError

func RecordSpanError(span trace.Span, err error)

RecordSpanError records a sanitized error on a span and sets its status to Error. Use this instead of raw span.RecordError + span.SetStatus to prevent credential leaks.

func SanitizeError

func SanitizeError(err error) string

SanitizeError strips URL-embedded credentials from an error message to prevent tokens from leaking into span status descriptions.

func Tracer

func Tracer(name string) trace.Tracer

Tracer returns a named tracer from the global provider.

Types

This section is empty.

Jump to

Keyboard shortcuts

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