You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
vercelAIIntegration: experimental_telemetry.metadata no longer recorded on gen_ai spans (v11 regression, ai <= 6) #24720
On SDK v10, vercelAIIntegration recorded experimental_telemetry.metadata as vercel.ai.telemetry.metadata.<key> span attributes. The data came from the AI SDK's own OTel spans (ai.telemetry.metadata.*), and the integration renamed every ai.* attribute to vercel.ai.*.
On v11, ai 4 to 6 go through the orchestrion subscriber (packages/server-utils/src/integrations/vercel-ai/vercel-ai-orchestrion-subscriber.ts) instead of OTel. That subscriber reads experimental_telemetry.isEnabled, functionId, recordInputs and recordOutputs, but never metadata. The channel subscriber that builds the spans (vercel-ai-dc-subscriber.ts) doesn't set any metadata attributes either. So the metadata is dropped, and apps lose request-level context (user, tenant, request id, ...) on gen_ai spans after they upgrade.
Expected:invoke_agent support-chat and its generate_content child carry vercel.ai.telemetry.metadata.requestId and vercel.ai.telemetry.metadata.tenantId, as on v10.
Actual (11.0.0, ai 6): neither span has any vercel.ai.telemetry.metadata.* attribute. All other attributes (function id, messages, tokens, model) are present.
A failing integration test covers this: dev-packages/node-integration-tests/suites/tracing/vercelai/span-streaming-v6/scenario-telemetry-metadata.mjs, test "records experimental_telemetry.metadata as span attributes". I only checked ai 6. ai 4 and 5 use the same subscriber, so they are probably affected too.
Proposed fix
Pass experimental_telemetry.metadata through the orchestrion message builder.
In the channel subscriber, set vercel.ai.telemetry.metadata.<key> on the invoke_agent span.
Copy the same attributes to child generate_content spans through a callId map, the same way as operationIdByCallId.
Open question: v10 may also have put metadata on tool call spans. If it did, execute_tool should get it too.
Activity
linear-code commentedon Sep 24, 2026
JS-3800
fix(server-utils): Record Vercel AI `experimental_telemetry.metadata`…
fix(server-utils): Record Vercel AI `experimental_telemetry.metadata`…
fix(server-utils): Record Vercel AI `experimental_telemetry.metadata`…
fix(server-utils): Record Vercel AI `experimental_telemetry.metadata`…
fix(server-utils): Record Vercel AI `experimental_telemetry.metadata`…
github-actions commentedon Oct 7, 2026
A PR closing this issue has just been released 🚀
This issue was referenced by PR #24721, which was included in the 11.5.0 release.