eval

package
v0.21.0 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package eval instruments generic Scope evaluation calls with OpenTelemetry.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidConfig    = errors.New("otel/eval: invalid config")
	ErrInvalidEvaluator = errors.New("otel/eval: invalid evaluator")
)

Functions

This section is empty.

Types

type Middleware

type Middleware[T any] struct {
	// contains filtered or unexported fields
}

Middleware is typed by the evaluated subject so Wrap remains the single composition API despite Go methods not supporting their own type parameters.

func NewMiddleware

func NewMiddleware[T any](config MiddlewareConfig) (Middleware[T], error)

NewMiddleware resolves nil OTel providers to the official process globals.

func (Middleware[T]) Wrap

func (m Middleware[T]) Wrap(next coreeval.Evaluator[T]) (coreeval.Evaluator[T], error)

Wrap decorates one evaluator without observing or retaining its subject.

type MiddlewareConfig

type MiddlewareConfig struct {
	TracerProvider trace.TracerProvider
	MeterProvider  metric.MeterProvider
}

MiddlewareConfig supplies optional OTel providers for evaluation instrumentation.

Jump to

Keyboard shortcuts

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