GeezerVison is showing github.com — docs(js): Clarify when agent tracing sets the conversation ID by sentry-junior[bot] · Pull Request #20894 · getsentry/sentry-docs
Conversation
DESCRIBE YOUR PR
Conversations needs a conversation ID, but the JS agent tracing docs only said that "some integrations infer it". Every integration page linked to the same generic paragraph, so users couldn't tell whether they had to call setConversationId(). This PR states the behavior of each integration in getsentry/sentry-javascript 11.12.0.
- Agent Tracing → Tracking Conversations: a table of which integrations set the ID always, only in some cases, or never, and where the ID comes from. Notes cover minimum SDK versions and which ID wins over
setConversationId(). A new "Set the Conversation ID Yourself" section covers:
- when you need it
- which ID to use and which to avoid
- setting it on every request before the first AI call
- that only
gen_ai.* spans get the ID
- examples for a request handler, a queue job (
withIsolationScope), and several conversations in one request (withScope)
- Integration pages:
- OpenAI, Vercel AI, Anthropic, LangChain and LangGraph get a "Conversation IDs" section that says exactly when the ID is inferred.
- Google Gen AI, Mistral, Groq, Together AI and TypeSafe say they don't set one.
- Workers AI says the ID is automatic only inside the Agents SDK.
- Manual instrumentation: a "Group Spans Into a Conversation" section with an example.
- Stale claims fixed:
Open questions for SDK reviewers
IS YOUR CHANGE URGENT?
- Urgent deadline (GA date, etc.): YYYY-MM-DD
- Other deadline: YYYY-MM-DD
- No deadline: Not urgent, can wait up to 1 week+
PRE-MERGE CHECKLIST
- Checked Vercel preview for correctness, including links
- PR was reviewed and approved by any necessary SMEs (subject matter experts)
- PR was reviewed and approved by a member of the Sentry docs team
via shannon.anahata.
--
View Session [Sentry]
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Add a per-integration table of which JavaScript AI integrations set
gen_ai.conversation.id automatically, conditionally, or never, and
expand the manual setConversationId guidance with scope rules and
examples. Fix stale claims for the Cloudflare Agents SDK (random
persisted ID, not the instance name) and Pi Durable (stored session ID).
Co-Authored-By: Shannon Anahata <[email protected]>
vercel
Bot
commented
Nov 18, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment

|
sentry-junior[bot] reacted with eyes emoji
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
Getting ready to monitor this change · Rollout details
| Status |
Service |
Environment |
| ⏳ Getting ready to monitor this change |
|
|
|
sentry-junior[bot] reacted with eyes emoji
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
…ng-conversation-ids
# Conflicts:
# docs/platforms/javascript/common/configuration/integrations/openai.mdx
Uh oh!
There was an error while loading. Please reload this page.
|
About the first open question: Eve, Flue, and Pi Durable are correct, because the framework ID wins over setConversationId(). Mastra works the other way. Since 11.15.0 (#26647), an ID from Sentry.setConversationId() wins over the Mastra thread ID, so Mastra users can call it to override the ID.
|
sentry-junior[bot] reacted with thumbs up emoji
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
Thanks. In c800e68 I added a note to the Mastra page: from SDK 11.15.0 (getsentry/sentry-javascript#26647), an ID set with Sentry.setConversationId() replaces the Mastra thread ID. I also marked the open question as answered in the PR description. The Eve, Flue, and Pi Durable pages are unchanged.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
Thanks. c800e682b adds a note to the Mastra page: from SDK 11.15.0 (getsentry/sentry-javascript#26647), an ID set with Sentry.setConversationId() replaces the Mastra thread ID. I also marked the open question as answered in the PR description. The Eve, Flue, and Pi Durable pages stay as they are.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
sentry-junior[bot] reacted with eyes emoji
This branch was successfully deployed
2 active (1 outdated)
deployments
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
|