telemetry

package
v0.12.2 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2023 License: MIT Imports: 28 Imported by: 1

Documentation

Index

Constants

View Source
const (
	DefaultServiceName = "service"
	DefaultTracerName  = "github.com/foomo/keel/telemetry"
)

Variables

View Source
var (
	TracerName  = DefaultTracerName
	ServiceName = DefaultServiceName
)
View Source
var (
	// DefaultHistogramBuckets units are selected for metrics in "seconds" unit
	DefaultHistogramBuckets = []float64{.001, .005, .01, .025, .05, .1, .25, .5, 1, 2.5, 5, 10, 25, 60, 120, 300, 600}
)

Functions

func End

func End(sp trace.Span, err error)

func Meter added in v0.2.0

func Meter() metric.Meter

func NewNoopMeterProvider added in v0.8.0

func NewNoopMeterProvider() (metric.MeterProvider, error)

func NewNoopTraceProvider added in v0.8.0

func NewNoopTraceProvider() (trace.TracerProvider, error)

func NewOTLPGRPCTraceProvider added in v0.8.0

func NewOTLPGRPCTraceProvider(ctx context.Context, opts ...otlptracegrpc.Option) (trace.TracerProvider, error)

func NewOTLPHTTPTraceProvider added in v0.8.0

func NewOTLPHTTPTraceProvider(ctx context.Context, opts ...otlptracehttp.Option) (trace.TracerProvider, error)

func NewPrometheusMeterProvider added in v0.8.0

func NewPrometheusMeterProvider() (metric.MeterProvider, error)

func NewStdOutMeterProvider added in v0.8.0

func NewStdOutMeterProvider(ctx context.Context, opts ...stdoutmetric.Option) (metric.MeterProvider, error)

func NewStdOutTraceProvider added in v0.8.0

func NewStdOutTraceProvider(ctx context.Context) (trace.TracerProvider, error)

func Start

func Start(ctx context.Context, spanName string, opts ...trace.SpanStartOption) (context.Context, trace.Span)

func TraceProvider added in v0.8.0

func TraceProvider() trace.TracerProvider

func Tracer

func Tracer() trace.Tracer

Types

type ErrorHandler added in v0.2.2

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

func NewErrorHandler added in v0.8.0

func NewErrorHandler(l *zap.Logger) *ErrorHandler

func (*ErrorHandler) Handle added in v0.2.2

func (h *ErrorHandler) Handle(err error)

func (*ErrorHandler) SetLogger added in v0.2.2

func (h *ErrorHandler) SetLogger(l *zap.Logger)

type Logger added in v0.8.0

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

func NewLogger added in v0.8.0

func NewLogger(l *zap.Logger) Logger

func (Logger) Enabled added in v0.8.0

func (l Logger) Enabled(level int) bool

func (Logger) Error added in v0.8.0

func (l Logger) Error(err error, msg string, keysAndValues ...interface{})

func (Logger) Info added in v0.8.0

func (l Logger) Info(level int, msg string, keysAndValues ...interface{})

func (Logger) Init added in v0.8.0

func (l Logger) Init(info logr.RuntimeInfo)

func (Logger) WithName added in v0.8.0

func (l Logger) WithName(name string) logr.LogSink

func (Logger) WithValues added in v0.8.0

func (l Logger) WithValues(keysAndValues ...interface{}) logr.LogSink

Jump to

Keyboard shortcuts

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