telemetry

package
v0.7.11 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2023 License: Apache-2.0 Imports: 14 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" default:"localhost:8090"`

	// 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