Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrFailedSetup = errors.New("failed to setup telemetry") ErrFailedExporter = errors.New("failed to setup exporter") )
View Source
var Log *slog.Logger
Functions ¶
func SetupOTelMetrics ¶
SetupOTelMetrics sets up the OpenTelemetry metrics provider with the Prometheus exporter. This allows using the in-process OpenTelemetry APIs, but exports them in a way that is easy to hook up to graph visualization software.
The objects it bootstraps are global, largely for convenience.
See: 1. https://github.com/open-telemetry/opentelemetry-go/blob/main/example/prometheus/main.go
Types ¶
type WithReader ¶
WithReader allows supplying different metric "readers" to the OpenTelemetry infrastructure. Readers allow exporting the data to different "sinks".
Click to show internal directories.
Click to hide internal directories.