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
- The 7.0.114 release, September 24, 2026, explicitly adds tracing-channel context filtering using the telemetry inclusion maps.
- This fixes a delivery-path difference; it does not require opting every context value into telemetry. Release 7.0.165, November 7.
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