component

package
v0.0.0-...-e368295 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ObservabilityConfig = "observability"
	LogKey              = "logger"
	MetricKey           = "opentelemetry"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type TelemetryLogger

type TelemetryLogger struct {
	EnableDebug bool
	// contains filtered or unexported fields
}

func (*TelemetryLogger) Check

func (*TelemetryLogger) Debug

func (t *TelemetryLogger) Debug(msg string, fields ...zap.Field)

func (*TelemetryLogger) Debugf

func (t *TelemetryLogger) Debugf(template string, args ...interface{})

func (*TelemetryLogger) Error

func (t *TelemetryLogger) Error(msg string, fields ...zap.Field)

func (*TelemetryLogger) Errorf

func (t *TelemetryLogger) Errorf(template string, args ...interface{})

func (*TelemetryLogger) Info

func (t *TelemetryLogger) Info(msg string, fields ...zap.Field)

func (*TelemetryLogger) Infof

func (t *TelemetryLogger) Infof(template string, args ...interface{})

func (*TelemetryLogger) Panic

func (t *TelemetryLogger) Panic(msg string, fields ...zap.Field)

func (*TelemetryLogger) Panicf

func (t *TelemetryLogger) Panicf(template string, args ...interface{})

func (*TelemetryLogger) Warn

func (t *TelemetryLogger) Warn(msg string, fields ...zap.Field)

func (*TelemetryLogger) Warnf

func (t *TelemetryLogger) Warnf(template string, args ...interface{})

type TelemetryManager

type TelemetryManager struct {
	MeterProvider metric.MeterProvider
	Logger        *zap.Logger
	Selector      []string
}

func NewTelemetryManager

func NewTelemetryManager() *TelemetryManager

func (*TelemetryManager) ConstructConfig

func (t *TelemetryManager) ConstructConfig(viper *viper.Viper)

func (*TelemetryManager) GetGlobalTelemetryTools

func (t *TelemetryManager) GetGlobalTelemetryTools() *TelemetryTools

func (*TelemetryManager) GetTelemetryTools

func (t *TelemetryManager) GetTelemetryTools(component string) *TelemetryTools

func (*TelemetryManager) SelectorOption

func (t *TelemetryManager) SelectorOption(component string) TelemetryOption

type TelemetryOption

type TelemetryOption func(*TelemetryTools)

func WithDebug

func WithDebug(enableDebug bool) TelemetryOption

type TelemetryTools

type TelemetryTools struct {
	MeterProvider metric.MeterProvider
	Logger        *TelemetryLogger
}

func NewDefaultTelemetryTools

func NewDefaultTelemetryTools() *TelemetryTools

func (*TelemetryTools) GetZapLogger

func (t *TelemetryTools) GetZapLogger() *zap.Logger

Jump to

Keyboard shortcuts

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