otel

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2024 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MustProvider

func MustProvider(ctx context.Context, logger logrus.FieldLogger, cfg Config, service, serviceNamespace, stage, serviceInstanceID string, opts ...otel.Option) metrics.Provider

MustProvider ensures setting up and starting a otel.Provider succeeds. nolint: lll

Types

type Config

type Config struct {
	Enabled              bool     `env:"ENABLE_OTEL_COLLECTION"`
	EnableRuntimeMetrics bool     `env:"OTEL_ENABLE_RUNTIME_METRICS,default=false"`
	CollectorURL         *url.URL `env:"OTEL_COLLECTOR_URL"`
	MetricsDestinations  []string `env:"OTEL_METRICS_DESTINATIONS,default=honeycomb;argus"`
	Honeycomb            honeycomb.Config

	// EndpointURL maps to the official opentelemetry environment variable for configuring the endpoint
	EndpointURL *url.URL `env:"OTEL_EXPORTER_OTLP_ENDPOINT"`
}

Config is a reusable configuration struct that contains the necessary environment variables to setup an metrics.Provider

Jump to

Keyboard shortcuts

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