Skip to main content

Module telemetry

Module telemetry 

Source
Expand description

Telemetry: lifecycle callbacks, options and the built-in tracing spans.

Lifecycle callbacks are awaited concurrently and isolate unwinding panics. The two execute_* wrappers preserve the actual call result. Integrations are injected per call through TelemetryOptions::integrations; there is no global registry. Callback settlement and wrapper ordering follow the Vercel AI SDK (packages/ai/src/telemetry/create-telemetry-dispatcher.ts); see NOTICE.

Structs§

AbortEvent
A streaming call was aborted by cancellation.
EmbedEndEvent
An embedding call finished.
EmbedStartEvent
An embedding call started.
EndEvent
A call finished.
ErrorEvent
An error occurred.
ModelCallContext
Context of a model call handed to Telemetry::execute_language_model_call.
ModelCallEndEvent
A model call finished and its tool calls were parsed.
ModelCallStartEvent
A model call is about to be made.
ModelIdentity
Provider and model ids of the model handling a call.
RecordedInputs
Inputs recorded when record_inputs is enabled.
RerankEndEvent
A rerank call finished.
RerankStartEvent
A rerank call started.
StartEvent
A call started.
StepEndEvent
A step finished.
StepStartEvent
A step started.
TelemetryOptions
Telemetry configuration of a call.
ToolExecutionContext
Context of a tool execution handed to Telemetry::execute_tool.
ToolExecutionEndEvent
A tool execution finished.
ToolExecutionStartEvent
A tool execution is about to start.
ToolOutcome
The successful outcome of a tool execution.

Enums§

ErrorPhase
Where an error occurred.
ModelCallOutcome
Result of a model call as seen by Telemetry::execute_language_model_call.

Constants§

WARNINGS_TARGET
Target used for adapter warnings.

Traits§

Telemetry
A telemetry integration with awaited lifecycle callbacks.