telemetry

package
v0.7.3 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2024 License: Apache-2.0 Imports: 18 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, logger log.Logger) (nrApp *newrelic.Application, cleanUp func(), err error)

Types

type Config

type Config struct {
	AppVersion string

	AppName       string              `yaml:"app_name" mapstructure:"app_name" default:"compass"`
	NewRelic      NewRelicConfig      `yaml:"newrelic" mapstructure:"newrelic"`
	OpenTelemetry OpenTelemetryConfig `yaml:"open_telemetry" mapstructure:"open_telemetry"`
}

type NewRelicConfig

type NewRelicConfig struct {
	Enabled bool `mapstructure:"enabled" default:"false"`
	// Deprecated: Use Config.AppName instead
	AppName    string `mapstructure:"appname" default:"compass"`
	LicenseKey string `mapstructure:"licensekey" default:""`
}

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