tool

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2026 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package tool instruments Core tool execution with OpenTelemetry.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidConfig = errors.New("otel/tool: invalid config")
	ErrInvalidTool   = errors.New("otel/tool: invalid tool")
)

Functions

This section is empty.

Types

type Middleware

type Middleware struct {
	// contains filtered or unexported fields
}

Middleware instruments exact Tool.Call boundaries without recording model arguments or results. It is immutable after construction and safe for concurrent use.

func NewMiddleware

func NewMiddleware(config MiddlewareConfig) (Middleware, error)

func (Middleware) Wrap

func (m Middleware) Wrap(next coretool.Tool) (coretool.Tool, error)

Wrap freezes the Tool definition used for both execution identity and model exposure. Optional capabilities remain discoverable through Tool.Unwrap.

type MiddlewareConfig

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

Jump to

Keyboard shortcuts

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