published fresh until

Vercel AI SDK: excluded context reached traces

Summary On AI SDK 7.0.100 or 7.0.113, tracing-channel subscribers can receive context omitted from telemetry; move to 7.0.114 or later and select fields with telemetry.includeRuntimeContext

Not for Sentry JS 10 to 11 tracing migration; see sentry-js-10-to-11-tracing-python-2-self-hosted-upgrade

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

What this thread does

Use AI SDK 7.0.114 or later and explicitly select context fields with telemetry.includeRuntimeContext and telemetry.includeToolsContext before sending context to tracing subscribers.

As of November 2026. On the reported 7.0.100 and 7.0.113 installations, registered integrations received filtered context while ai:telemetry subscribers received excluded fields too. Report #21442.

What changed

Do first:

1. Inspect the resolved ai dependency in the process emitting telemetry. If it is one of the affected releases, update within AI SDK 7 to a release containing the 7.0.114 fix. Changing only the tracing exporter does not change which context the SDK publishes. Fix and release record. 2. On the existing generateText or streamText call, explicitly include only the top-level runtime fields the trace needs:

runtimeContext: {
  requestId: 'r1',
  userNote: 'private',
},
telemetry: {
  includeRuntimeContext: { requestId: true },
},

With the documented inclusion behavior, telemetry receives requestId; userNote stays available to application code. Telemetry guide.

3. Apply the separate map for tool-specific context. For a configured tool named lookup, the call-level setting is:

telemetry: {
  includeRuntimeContext: { requestId: true },
  includeToolsContext: {
    lookup: { tenantId: true },
  },
},

This permits tenantId from that tool's configured context without including its other properties. Maps select top-level fields; omitted fields are excluded. Context inclusion documentation.

4. Inspect both the SDK event and the exported span for an example request containing a harmless excluded marker. The distinction matters because a filtered SDK event and an exporter choosing not to record context are different outcomes. Downstream Sentry report.

Diagnostic: integration callback is filtered but channel event is not

The September 24 report by BrandonNoad compares the two paths and says subscribers “receive both unfiltered”. It identifies generateText/streamText start context and per-tool execution context, with affected package versions 7.0.100 and 7.0.113. The official release records the correction in 7.0.114.

Evidence

The issue includes a minimal comparison of channel events and integration callbacks. The independent Sentry issue #24706, September 24 explains the downstream consequence: its subscriber did not yet record runtime context, and any addition needed to account for the SDK filtering fix. An SDK event carrying a value is not by itself proof that Sentry stored it.

A later October 22 report #23853 identifies 7.0.114 as the boundary and explains why telemetry consumers could not infer the emitting SDK version from event shape alone.

Limits

The reported affected versions are 7.0.100 and 7.0.113. These APIs and the channel are AI SDK 7 behavior, so the fix is not a configuration recipe for AI SDK 6.

Context filtering applies to telemetry. Tool execution, lifecycle callbacks and returned results retain their application context; do not treat the inclusion map as general object redaction. Exporters can also have their own attribute rules. Context boundaries.

Not for: Sentry JS 10 to 11 tracing migration; see sentry-js-10-to-11-tracing-python-2-self-hosted-upgrade

Started from a post by @BrandonNoad, packaged by the editor. Original post

Subjects

More in agent workflows

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# Vercel AI SDK: excluded context reached traces
Summary: On AI SDK 7.0.100 or 7.0.113, tracing-channel subscribers can receive context omitted from telemetry; move to 7.0.114 or later and select fields with telemetry.includeRuntimeContext
Copy for agent
get the whatworks thread ai-sdk-tracing-channel-context-allowlist and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread ai-sdk-tracing-channel-context-allowlist
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp/login and sign me in so I have an account. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp/login && claude mcp login whatworks
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp/login && codex mcp login whatworks