telemetry

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package telemetry sets up OpenTelemetry tracing for Stampede itself. Tracing is off unless the standard OTEL_EXPORTER_OTLP_ENDPOINT (or OTEL_EXPORTER_OTLP_TRACES_ENDPOINT) environment variable is set; then spans are exported over OTLP, using gRPC when OTEL_EXPORTER_OTLP_PROTOCOL (or ..._TRACES_PROTOCOL) is "grpc" and HTTP/protobuf otherwise. The other standard variables (headers, sampler, service name, resource attributes) are honoured by the OpenTelemetry SDK.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Enabled

func Enabled() bool

Enabled reports whether an OTLP endpoint is configured.

func Protocol

func Protocol() string

Protocol returns the configured OTLP protocol for traces: "grpc" or "http/protobuf" (the default).

func Setup

func Setup(ctx context.Context, service, version string) (shutdown func(context.Context) error, err error)

Setup installs a global tracer provider exporting over OTLP when an endpoint is configured, and the W3C trace context propagator. It returns a function that flushes and stops the exporter. Without an endpoint it changes nothing and the returned function is a no-op.

Types

This section is empty.

Jump to

Keyboard shortcuts

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