telemetry

package
v0.10.6 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2026 License: Apache-2.0 Imports: 18 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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