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.
Click to show internal directories.
Click to hide internal directories.