telemetry

package module
v0.0.0-...-4e83faa Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2023 License: MPL-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(*TelemetryOptions) error

func MetricOptions

func MetricOptions(metricOptions ...metric.Option) Option

func Resource

func Resource(resource resource.Resource) Option

func TracingOptions

func TracingOptions(tracingOptions ...sdktrace.TracerProviderOption) Option

type TelemetryConfig

type TelemetryConfig struct {
	OTLPAddr     string `toml:"addr"`
	OTLPCAPath   string `toml:"ca_path"`
	OTLPCertPath string `toml:"cert_path"`
	OTLPKeyPath  string `toml:"key_path"`
	Insecure     bool   `toml:"insecure"`
	// contains filtered or unexported fields
}

func (*TelemetryConfig) InitializeTelemetry

func (t *TelemetryConfig) InitializeTelemetry(ctx context.Context, serviceName string, logger zerolog.Logger, options ...Option) error

Initialize Metrics + Tracing for the app. NOTE: you must call defer t.Stop() to propely cleanup

func (*TelemetryConfig) RegisterFlags

func (t *TelemetryConfig) RegisterFlags(f *flag.FlagSet)

func (*TelemetryConfig) Shutdown

func (t *TelemetryConfig) Shutdown(ctx context.Context, logger zerolog.Logger) error

type TelemetryOptions

type TelemetryOptions struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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