opentelemetry

package
v0.12.8-alpha.5 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init(ctx context.Context, cfg Config) (func() error, error)

Types

type Config

type Config struct {
	Enabled        bool              `mapstructure:"enabled" default:"false"`
	ServiceName    string            `mapstructure:"service_name" default:"guardian"`
	ServiceVersion string            `mapstructure:"service_version"`
	Labels         map[string]string `mapstructure:"labels"`
	Exporter       string            `mapstructure:"exporter" default:"stdout"`
	OTLP           struct {
		Headers  map[string]string `mapstructure:"headers"`
		Endpoint string            `mapstructure:"endpoint" default:"127.0.0.1:4317"`
	} `mapstructure:"otlp"`
	SamplingFraction int           `mapstructure:"sampling_fraction"`
	MetricInterval   time.Duration `mapstructure:"metric_interval" default:"15s"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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