internal

package
v0.0.0-...-8c16a7d Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2023 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetMeter

func GetMeter() metric.Meter

func GetOTELErrorAttrs

func GetOTELErrorAttrs(callSkipLevels int) []attribute.KeyValue

GetOTELErrorAttrs gets error related OTEL attributes

func GetTracer

func GetTracer() trace.Tracer

func NewOTELMeterProvider

func NewOTELMeterProvider(res *resource.Resource) (*sdkmetric.MeterProvider, error)

func NewOTELPropagator

func NewOTELPropagator(isSentryEnabled bool) propagation.TextMapPropagator

func NewOTELResourceFromEnv

func NewOTELResourceFromEnv(ctx context.Context) (*resource.Resource, error)

NewOTELResourceFromEnv returns a new instance of OTEL resource from env

func NewOTELTraceProvider

func NewOTELTraceProvider(res *resource.Resource, isSentryEnabled bool) (*sdktrace.TracerProvider, error)

func NewZap

func NewZap(debugMode bool, res *resource.Resource) (*zap.Logger, error)

func OTELAttrsFromContext

func OTELAttrsFromContext(ctx context.Context) []attribute.KeyValue

func SetOTELAttrsInContext

func SetOTELAttrsInContext(ctx context.Context, attrs []attribute.KeyValue) context.Context

func SetZapInContext

func SetZapInContext(ctx context.Context, l *zap.Logger) context.Context

func ZapFromContext

func ZapFromContext(ctx context.Context) *zap.Logger

func ZapLogEnriched

func ZapLogEnriched(z *zap.Logger, level zapcore.Level, msg string, span trace.Span, attrs []attribute.KeyValue)

Types

type ContextKey

type ContextKey struct {
	Name string
}

ContextKey implementation is referenced from go stdlib: https://github.com/golang/go/blob/2184a394777ccc9ce9625932b2ad773e6e626be0/src/net/http/http.go#L42

func (ContextKey) String

func (k ContextKey) String() string

Jump to

Keyboard shortcuts

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