Documentation ¶
Index ¶
- func GetMeter() metric.Meter
- func GetOTELErrorAttrs(callSkipLevels int) []attribute.KeyValue
- func GetTracer() trace.Tracer
- func NewOTELMeterProvider(res *resource.Resource) (*sdkmetric.MeterProvider, error)
- func NewOTELPropagator(isSentryEnabled bool) propagation.TextMapPropagator
- func NewOTELResourceFromEnv(ctx context.Context) (*resource.Resource, error)
- func NewOTELTraceProvider(res *resource.Resource, isSentryEnabled bool) (*sdktrace.TracerProvider, error)
- func NewZap(debugMode bool, res *resource.Resource) (*zap.Logger, error)
- func OTELAttrsFromContext(ctx context.Context) []attribute.KeyValue
- func SetOTELAttrsInContext(ctx context.Context, attrs []attribute.KeyValue) context.Context
- func SetZapInContext(ctx context.Context, l *zap.Logger) context.Context
- func ZapFromContext(ctx context.Context) *zap.Logger
- func ZapLogEnriched(z *zap.Logger, level zapcore.Level, msg string, span trace.Span, ...)
- type ContextKey
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetOTELErrorAttrs ¶
GetOTELErrorAttrs gets error related OTEL attributes
func NewOTELMeterProvider ¶
func NewOTELMeterProvider(res *resource.Resource) (*sdkmetric.MeterProvider, error)
func NewOTELPropagator ¶
func NewOTELPropagator(isSentryEnabled bool) propagation.TextMapPropagator
func NewOTELResourceFromEnv ¶
NewOTELResourceFromEnv returns a new instance of OTEL resource from env
func NewOTELTraceProvider ¶
func SetOTELAttrsInContext ¶
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
Click to show internal directories.
Click to hide internal directories.