observability

package
v0.0.0-...-2d1ab9f Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	LevelTrace slog.Level = -8
)

Variables

View Source
var Disabled bool
View Source
var Tracer ttt.Tracer

Functions

func NamedTrace

func NamedTrace(ctx context.Context, spanName string, kind trace.SpanKind, opts ...trace.SpanStartOption) (context.Context, trace.Span)

func Trace

func Trace(ctx context.Context, kind trace.SpanKind) (context.Context, trace.Span)

Types

type LoggingHook

type LoggingHook struct {
	DisableJSONLogging bool   `desc:"Disable JSON logging."`
	LogLevel           string `required:"true" desc:"Log level, must be one of: trace,debug,info,warn,error,fatal,panic"`
}

LoggingHook is a command hook for configuring logging.

func (*LoggingHook) PreRun

func (c *LoggingHook) PreRun(_ context.Context) error

type OTelHook

type OTelHook struct {
	ServiceName string
	// contains filtered or unexported fields
}

func (*OTelHook) PostRun

func (h *OTelHook) PostRun(ctx context.Context, err error, _ command.ExitCode) error

func (*OTelHook) PreRun

func (h *OTelHook) PreRun(ctx context.Context) error

type SlogLogrAdapter

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

func (*SlogLogrAdapter) Enabled

func (a *SlogLogrAdapter) Enabled(level int) bool

func (*SlogLogrAdapter) Error

func (a *SlogLogrAdapter) Error(err error, msg string, keysAndValues ...interface{})

func (*SlogLogrAdapter) Info

func (a *SlogLogrAdapter) Info(level int, msg string, keysAndValues ...interface{})

func (*SlogLogrAdapter) Init

func (a *SlogLogrAdapter) Init(_ logr.RuntimeInfo)

func (*SlogLogrAdapter) WithName

func (a *SlogLogrAdapter) WithName(_ string) logr.LogSink

func (*SlogLogrAdapter) WithValues

func (a *SlogLogrAdapter) WithValues(keysAndValues ...interface{}) logr.LogSink

Jump to

Keyboard shortcuts

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