unstale

npm / @ai-sdk/otel

@ai-sdk/otel

What changed in @ai-sdk/otel 1 to 7, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-30.

14 breaking3 security1 deprecations13 new APIs and options8 behavior and defaults9 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli on npm

@ai-sdk/otel 79 changes

Breaking changes 7

  • A new package provides the OpenTelemetry integration, so developers can import it from @ai-sdk/otel.

    1.0.0, 7.0.0release notesupgrade guide

  • The package is ESM-only; CommonJS require() is no longer supported, so use ESM import syntax.

    7.0.0upgrade guide

  • The tracer property has been removed from experimental_telemetry. Pass a custom OpenTelemetry Tracer to the OpenTelemetry constructor instead.

    7.0.0upgrade guide

  • The minimum supported Node.js version is raised to 22; supported versions are 22, 24, and 26.

    1.0.0, 7.0.0release notesupgrade guide

  • Telemetry integrations and tracing-channel subscribers receive the renamed embedding callback and type instead of onEmbedFinish.

    7.0.0upgrade guide

  • Telemetry integrations and tracing-channel subscribers receive the renamed reranking callback and type instead of onRerankFinish.

    7.0.0upgrade guide

  • Telemetry integrations should implement the renamed per-step lifecycle callback onStepEnd instead of onStepFinish.

    7.0.0upgrade guide

Behavior and default changes 2

  • Once a telemetry integration is registered, AI SDK calls emit telemetry by default. Set isEnabled to false to opt out of a specific call, or register no integration to disable telemetry globally.

    7.0.0upgrade guide

  • The telemetry configuration option is now named telemetry; experimental_telemetry remains a deprecated alias during the deprecation window.

    7.0.0upgrade guide

@ai-sdk/otel 139 changes

Breaking changes 7

  • Output parts now follow content order, text blocks are not merged, and supported file, reasoning file, custom, tool error, and tool approval parts are emitted on both output and input sides; the root span records content from all steps in…

    1.0.174release notes

  • The API name changed from evaluate to decide.

    1.0.128release notes

  • Packages are compiled for the ES2022 runtime target, which may affect runtime compatibility.

    1.0.116release notes

  • Packages are ESM-only; consumers using require() must switch to ESM import syntax.

    1.0.0release notes

  • OpenTelemetry is renamed to LegacyOpenTelemetry, so developers using the old name must update their code.

    1.0.0release notes

  • GenAIOpenTelemetry is renamed to OpenTelemetry, so developers using the old name must update their code.

    1.0.0release notes

  • Telemetry integration names change from *TelemetryIntegration to *Telemetry.

    1.0.0release notes

Security 3

  • Both OTel integrations redact every header value in telemetry-only copies of plain Google MCP server tool definitions, keeping connector credentials out of telemetry attributes.

    1.0.174release notes

  • Restores credential redaction for unannotated OpenAI MCP, Code Interpreter, and shell tool definitions in both OpenTelemetry integrations, preserving protection for older providers and plain provider tool definitions without changing application or provider arguments.

    1.0.168release notes

  • Telemetry integrations redact Code Interpreter and shell domain secrets, plus MCP authorization and header values, from exported tool definitions while preserving credentials in provider requests.

    1.0.163release notes

Deprecations 1

  • This function is deprecated; formatOutputContent is added.

    1.0.174release notes

New APIs and options 13

  • Adds a function for formatting output content.

    1.0.174release notes

  • Formatting helpers and their output types are exported for reuse outside the telemetry integration.

    1.0.166release notes

  • Typed experimental durable context hooks are available for telemetry integrations.

    1.0.162release notes

  • Pass durable context with the same OpenTelemetryIdGenerator used for the tracer provider's idGenerator and sampler to carry parent trace context and sampling across WorkflowAgent steps and reconstruct the enclosing invoke_agent tree.

    1.0.162release notes

  • Records an OpenTelemetry histogram in seconds for generateText and streamText model calls, including errors, cancellation, and failed stream retry attempts, so configured metric exporters can report inference latency.

    1.0.160release notes

  • Telemetry integrations now support the onStepError callback.

    1.0.154release notes

  • Adds an option to OpenTelemetry to name root agent spans using functionId or a custom callback; model-based span names remain the default.

    1.0.149release notes

  • Experimental streaming lifecycle callbacks are added.

    1.0.124release notes

  • Telemetry is added to speech generation and transcription.

    1.0.124release notes

  • Adds telemetry support to experimental_evaluate, allowing developers to use telemetry with it.

    1.0.111release notes

  • An option allows developers to provide custom span attributes.

    1.0.0release notes

  • Performance metrics are emitted using GenAI semantic conventions.

    1.0.0release notes

  • Opt-in options add supplemental AI SDK attributes to OpenTelemetry spans.

    1.0.0release notes

Behavior and default changes 6

  • The actual chat HTTP endpoint is reported through optional request metadata and model-call end events, recorded as host and port on OpenTelemetry chat spans, and exposed as a sanitized origin in generation results and callbacks.

    1.0.163release notes

  • Model-call spans record normalized state parts, while outer spans retain the public state inputs.

    1.0.133release notes

  • Telemetry includes provider usage propagation.

    1.0.124release notes

  • Runtime context attribution is added to embed, embedMany, and rerank.

    1.0.98release notes

  • Spans are now added for providerExecuted tools, making their execution observable through OpenTelemetry.

    1.0.70release notes

  • The integration adds a span at the step level.

    1.0.0release notes

Fixes and other changes 9

  • Ends the span of a model call when a stream retry or steering interrupt starts a new one.

    1.0.177release notes

  • Decision model response identifiers are now recorded.

    1.0.138release notes

  • Decision file bytes are serialized as base64 in OpenTelemetry state attributes.

    1.0.133release notes

  • Spans are marked with status ERROR when the finish reason is error.

    1.0.128release notes

  • API error spans preserve HTTP status codes.

    1.0.98release notes

  • Fallback spans are attributed to the provider that succeeds.

    1.0.98release notes

  • OpenTelemetry now records tool results and definitions for tools executed by the provider.

    1.0.69release notes

  • A nested context object now creates a separate attribute.

    1.0.0release notes

  • Invalid span array attribute values are sanitized to avoid OTLP ingestion failures and function log errors.

    1.0.0release notes