-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
docs(js): Add AI Agent Monitoring as top-level feature with SplitLayout #16117
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
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.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
adf8b49 to
50ba959
Compare
|
|
||
| ## Manual Instrumentation | ||
|
|
||
| If you're using a library that Sentry does not automatically instrument, you can manually instrument your code to capture spans. For your AI agents data to show up in the Sentry [AI Agents Insights](https://sentry.io/orgredirect/organizations/:orgslug/insights/ai/agents/), spans must have well-defined names and data attributes. |
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.
| If you're using a library that Sentry does not automatically instrument, you can manually instrument your code to capture spans. For your AI agents data to show up in the Sentry [AI Agents Insights](https://sentry.io/orgredirect/organizations/:orgslug/insights/ai/agents/), spans must have well-defined names and data attributes. | |
| If you're using a library that Sentry does not automatically instrument, you can manually instrument your code to capture spans. For your AI agents data to show up in Sentry [AI Agents Insights](https://sentry.io/orgredirect/organizations/:orgslug/insights/ai/agents/), spans must have well-defined names and data attributes. |
| <Expandable title="All AI Request span attributes"> | ||
| <Include name="tracing/ai-agents-module/ai-client-span" /> | ||
| </Expandable> |
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.
The table inside this collapsed section, because of the two column layout, is reaaaallly hard. I can hardly see what's on the table and it feels like infinite scroll to see what else is there. Anything else we can do with this content to make it easier to read?
| <Expandable title="All Invoke Agent span attributes"> | ||
| <Include name="tracing/ai-agents-module/invoke-agent-span" /> | ||
| </Expandable> |
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.
Same with this one. The table nested in here is unreadable.
| - [Python](/platforms/python/tracing/instrumentation/custom-instrumentation/ai-agents-module) | ||
| - [Node.js](/platforms/javascript/guides/node/tracing/instrumentation/ai-agents-module/) | ||
| - [Browser (JavaScript)](/platforms/javascript/tracing/instrumentation/ai-agents-module-browser/) | ||
| - [Node.js](/platforms/javascript/guides/node/ai-agent-monitoring/) |
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.
Do we need a redirect for this old path, or good to go?
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.
redirects are setup!
| <Expandable title="All AI Request span attributes"> | ||
| <Include name="tracing/ai-agents-module/ai-client-span" /> | ||
| </Expandable> |
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.
Highlighting that the same problem is here with the nested table
| <Expandable title="All Invoke Agent span attributes"> | ||
| <Include name="tracing/ai-agents-module/invoke-agent-span" /> | ||
| </Expandable> |
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.
And here with that table
| <Expandable title="All Execute Tool span attributes"> | ||
| <Include name="tracing/ai-agents-module/execute-tool-span" /> | ||
| </Expandable> |
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.
Same with the table in here
Move AI Agent Monitoring from /tracing/instrumentation/ai-agents-module/ to a new top-level /ai-agent-monitoring/ feature across all JavaScript SDKs. - Create new ai-agent-monitoring directory with index.mdx and browser.mdx - Add redirects from old paths to new paths - Update internal links in Next.js docs and product docs - Delete old ai-agents-module files Co-Authored-By: Claude <noreply@anthropic.com>
- Add SplitLayout pattern for better code/text presentation - Add Prerequisites section linking to tracing setup - Add Options section documenting recordInputs/recordOutputs - Wrap all span examples in SplitLayout for side-by-side view Co-Authored-By: Claude <noreply@anthropic.com>
Fill the dead space in SplitLayout sections by listing the most important attributes upfront, with expandables for the full reference. Co-Authored-By: Claude <noreply@anthropic.com>
- Change sidebar title from "AI Agent Monitoring" to "AI Monitoring" - Add MCP Server Monitoring section with link to instrumentation docs Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
When someone navigates to /platforms/javascript/ai-agent-monitoring/ (the browser SDK which doesn't support server-side AI monitoring), redirect to the browser-specific page instead of 404. Co-Authored-By: Claude <noreply@anthropic.com>
When switching between platforms/SDKs in the dropdown, the selector now tries to maintain the current page context by extracting the relative path and using /platform-redirect to find the equivalent page on the target platform. For example, switching from Next.js AI Agent Monitoring to JavaScript will now redirect to the browser-specific AI monitoring page instead of the platform root. Co-Authored-By: Claude <noreply@anthropic.com>
When switching platforms via the dropdown, the sidebar now correctly redirects between ai-agent-monitoring and ai-agent-monitoring-browser paths instead of falling back to the platform root. Co-Authored-By: Claude <noreply@anthropic.com>
- Fix destination for guide browser redirects to point to base browser page - Fix base JS redirect to use correct ai-agent-monitoring-browser path Co-Authored-By: Claude <noreply@anthropic.com>
…edirect The sidebar already computes the correct URL for each platform including equivalent path handling. Using platform-redirect bypassed this logic and caused incorrect redirects for pages like ai-agent-monitoring-browser. Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Common pages are inherited by guides, so the redirect should maintain the guide path (e.g., /guides/react/ai-agent-monitoring-browser/). Co-Authored-By: Claude <noreply@anthropic.com>
…older Update AI monitoring docs to use dynamic SDK package names so the correct package is shown for each platform (e.g., @sentry/nextjs on Next.js pages, @sentry/react on React pages). Co-Authored-By: Claude <noreply@anthropic.com>
- Replace AI Request Span with AI Client Span (op: gen_ai.chat) in browser docs - Update all span examples to use verbose style with agent/AI object definitions - Move Expandables outside SplitLayout per review feedback - Inline handoff span attributes in description (short content) - Inline Common Span Attributes table in browser docs Co-Authored-By: Claude <noreply@anthropic.com>
50ba959 to
b2599dd
Compare
sfanahata
left a comment
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.
👏
DESCRIBE YOUR PR
This PR restructures the JavaScript AI Agent Monitoring documentation:
Documentation Changes
ai-agent-monitoring-browser/page for Browser JavaScript with appropriate contentrecordInputs/recordOutputsprivacy controlsPlatform Switching Improvements
ai-agent-monitoring(Node.js) andai-agent-monitoring-browser(Browser JS) paths instead of falling back to the platform rootEQUIVALENT_PATHSconstant in sidebar to handle pages that exist at different paths on different platformsIS YOUR CHANGE URGENT?
PRE-MERGE CHECKLIST
🤖 Generated with Claude Code