telemetry

package
v0.9.2 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2026 License: MIT Imports: 14 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package telemetry sets up the OTLP export of traces and metrics.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Setup

func Setup(ctx context.Context, enabled bool) (func(context.Context) error, error)

Setup starts the export of traces when enabled is true. The endpoint, the headers, the sampler and the service name come from the OTEL_* environment, and the service name is ward when the environment sets none. The returned function flushes and stops the export.

func SetupMetrics added in v0.7.0

func SetupMetrics(ctx context.Context, enabled bool, reg promclient.Gatherer) (func(context.Context) error, error)

SetupMetrics exports the metrics of reg over OTLP, on the interval of OTEL_METRIC_EXPORT_INTERVAL, when enabled is true. The returned function flushes and stops the export.

Types

This section is empty.

Jump to

Keyboard shortcuts

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