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 ¶
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.