observability

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnableTracing added in v0.1.3

func EnableTracing(enabled bool)

EnableTracing toggles OpenTelemetry span emission for shared helpers.

func StartSpan added in v0.1.3

func StartSpan(ctx context.Context, name string, attrs ...attribute.KeyValue) (context.Context, trace.Span)

StartSpan creates a tracer span when tracing is enabled and returns the context/span pair. When tracing is disabled, it returns the original context and a no-op span.

func TracingEnabled added in v0.1.3

func TracingEnabled() bool

TracingEnabled reports whether spans should be emitted.

Types

type Logger

type Logger interface {
	CacheHit(expression, expressionType string)
	EvaluationStart(expression, expressionType string)
	EvaluationError(err error, expression, expressionType string, duration time.Duration)
	EvaluationSuccess(expression, expressionType string, duration time.Duration, result any)
}

Logger defines the interface for a structured logger that can be used by shared packages.

Jump to

Keyboard shortcuts

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