ReadonlynativeThis instance's configured VercelAISDKTelemetryOptions.nativeTelemetry.
Read by the prompts() helper to decide whether to defer to a sibling
OpenTelemetry integration for a given call.
Called when a streaming text generation operation is aborted before it completes.
Called when an operation completes. Fired for text generation (generateText/streamText), object generation (generateObject/streamObject), embedding (embed/embedMany), and reranking operations.
Use the event shape or operationId to distinguish between operation types.
Called when an operation begins. Fired for text generation (generateText/streamText), object generation (generateObject/streamObject), embedding (embed/embedMany), and reranking operations.
Use the operationId field to distinguish between operation types.
Called when an individual step (single LLM invocation) completes.
The event is a StepResult containing the model's response, tool calls
and results, usage statistics, finish reason, and optional request/response
bodies.
Called when an individual step (single LLM invocation) begins. A generation may consist of multiple steps (e.g. when tool calls trigger follow-up LLM calls). Use this to create per-step spans or record step-level inputs.
The event includes the step number, accumulated previous step results, and the messages that will be sent to the model.
Called when a tool execution completes, either successfully or with an error.
The event uses a discriminated union on the success field — check
event.success to determine whether output or error is available.
The event includes execution time (toolExecutionMs) for performance tracking.
Called when a tool execution begins, before the tool's execute function
is invoked. Use this to create tool-level spans or log tool invocations.
ProtectedsinksAdd a sink. May be called multiple times; the ingestor writes to every added sink.
Mints a PerPromptTelemetry integration bound to the given prompt identity.
Used by the prompts() helper so a helper-defined prompt is recorded with
full identity. Called with no identity (e.g. by the playground for a raw,
non-helper config) it still binds a trace id but records without prompt
identity — the same data the global fallback would, just under a known id.
Optionalidentity: PromptSpanInfoProtectedfailProtectedrecordProtectedrecordRemove a previously-added sink. Returns true if the given sink was found
and removed, otherwise false.
Native v7 AI SDK
Telemetryintegration that records evalution traces without going through OpenTelemetry.When your app starts, register this globally via
registerTelemetry(new Evalution())to capture everygenerateText/streamTextcall as a fallback (events are keyed bycallId, so concurrent calls stay correctly separated, though the fallback lacks prompt identity). Theprompts()helper additionally swaps in a per-call integration from createTelemetryForPrompt so helper-defined prompts are recorded with full identity.When an OpenTelemetry integration is also active, this class defers to it by default (see VercelAISDKTelemetryOptions.nativeTelemetry) rather than emitting a duplicate, parallel trace.