Summary
When agent tracing is selected for an app that uses the Vercel AI SDK, sentry init adds Sentry.vercelAIIntegration() but does not set a conversation ID or the user. AI spans arrive, but every chat turn is its own row in Agent Tracing → Conversations, with no user attached.
The platform docs cover this under Tracking Conversations: call Sentry.setConversationId() with a stable ID and Sentry.setUser() on each request that makes AI calls.
Observed (getsentry/sentry-devex#91, @sentry/nextjs 11.x, ai 7)
vercelAIIntegration() added to the server config. On JavaScript SDK 11 this integration is already enabled automatically on Node when tracing is on, so the line is redundant.
- No
setConversationId / setUser in either chat route.
Suggested
When agent tracing is selected and the app has request handlers that call an AI library:
- set the conversation ID and user in those handlers (the app's own chat/thread ID and the authenticated user), or at minimum point to the Tracking Conversations section in the success output;
- skip
vercelAIIntegration() on SDK ≥ 11 server runtimes, where it is a default.
For comparison, the sentry-for-ai sentry-instrument skill now wires both calls when AI monitoring is requested (getsentry/sentry-for-ai#361).
Created with Claude Code
Summary
When agent tracing is selected for an app that uses the Vercel AI SDK,
sentry initaddsSentry.vercelAIIntegration()but does not set a conversation ID or the user. AI spans arrive, but every chat turn is its own row in Agent Tracing → Conversations, with no user attached.The platform docs cover this under Tracking Conversations: call
Sentry.setConversationId()with a stable ID andSentry.setUser()on each request that makes AI calls.Observed (getsentry/sentry-devex#91,
@sentry/nextjs11.x,ai7)vercelAIIntegration()added to the server config. On JavaScript SDK 11 this integration is already enabled automatically on Node when tracing is on, so the line is redundant.setConversationId/setUserin either chat route.Suggested
When agent tracing is selected and the app has request handlers that call an AI library:
vercelAIIntegration()on SDK ≥ 11 server runtimes, where it is a default.For comparison, the sentry-for-ai
sentry-instrumentskill now wires both calls when AI monitoring is requested (getsentry/sentry-for-ai#361).Created with Claude Code