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.
Click to show internal directories.
Click to hide internal directories.