telemetry

package
v0.25.1 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2025 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigureTelemetry

func ConfigureTelemetry(metricsPort int, serviceName string, opts ...Option) (func(context.Context) error, error)

ConfigureTelemetry will configure OpenTelemetry to expose metrics and traces using Prometheus export for metrics and OTEL grpc exporter for traces. The given port is the port to expose metrics, the given serviceName is the OTEL service name attribute associated with all traces. The function will return a shutdown function that can be called when shutting down the process.

Types

type Option added in v0.24.0

type Option func(*config)

Option is a functional option for configuring telemetry.

func WithEnvConfig added in v0.24.5

func WithEnvConfig() Option

WithEnvConfig allows for OTLP trace client configuration via environment variables, overriding the default insecure gRPC connection.

func WithoutMetricsServer added in v0.24.0

func WithoutMetricsServer() Option

WithoutMetricsServer disables the startup of the metrics server.

Jump to

Keyboard shortcuts

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