telemetry

package
v0.5.4 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2023 License: Apache-2.0 Imports: 16 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, lg *zap.Logger)

Init initialises OpenCensus based async-telemetry processes and returns (i.e., it does not block).

Types

type Config

type Config struct {
	// Debug sets the bind address for pprof & zpages server.
	Debug string `mapstructure:"debug_addr"`

	// OpenCensus trace & metrics configurations.
	EnableCPU        bool    `mapstructure:"enable_cpu"`
	EnableMemory     bool    `mapstructure:"enable_memory"`
	SamplingFraction float64 `mapstructure:"sampling_fraction"`

	// OpenCensus exporter configurations.
	ServiceName string `mapstructure:"service_name"`

	// NewRelic exporter.
	EnableNewrelic bool   `mapstructure:"enable_newrelic"`
	NewRelicAPIKey string `mapstructure:"newrelic_api_key"`

	// OpenTelemetry Agent exporter.
	EnableOtelAgent  bool   `mapstructure:"enable_otel_agent"`
	OpenTelAgentAddr string `mapstructure:"otel_agent_addr"`
}

Jump to

Keyboard shortcuts

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