telemetry

package
v0.3.6 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: Apache-2.0 Imports: 17 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init(ctx context.Context, cfg Config, logger log.Logger) (cleanUp func(), err error)

Types

type Config

type Config struct {
	AppVersion string

	AppName       string              `yaml:"app_name" mapstructure:"app_name" default:"service"`
	OpenTelemetry OpenTelemetryConfig `yaml:"open_telemetry" mapstructure:"open_telemetry"`
}

type OpenTelemetryConfig

type OpenTelemetryConfig struct {
	Enabled                bool          `yaml:"enabled" mapstructure:"enabled" default:"false"`
	CollectorAddr          string        `yaml:"collector_addr" mapstructure:"collector_addr" default:"localhost:4317"`
	PeriodicReadInterval   time.Duration `yaml:"periodic_read_interval" mapstructure:"periodic_read_interval" default:"1s"`
	TraceSampleProbability float64       `yaml:"trace_sample_probability" mapstructure:"trace_sample_probability" default:"1"`
}

Jump to

Keyboard shortcuts

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