Repository navigation
docs(agents): Add Claude Platform OTLP guide and Anthropic home card #19997
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
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
61ffab0
docs(agents): Add Claude Platform OTLP guide and Anthropic home card
sentry-junior[bot] e5342c6
docs(agents): Link Claude Console root instead of auth-only settings URL
sentry-junior[bot] d8dcc2c
docs(agents): Cap Claude Platform screenshot widths
sentry-junior[bot] f7f3701
docs(agents): Update Claude Platform beta and platform support note
sentry-junior[bot] File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,71 @@ | ||
| --- | ||
| title: Claude Platform | ||
| sidebar_title: Claude Platform | ||
| sidebar_order: 30 | ||
| description: "Send OpenTelemetry traces from Claude Managed Agents and the Claude Messages API to Sentry, with no code changes." | ||
| keywords: | ||
| [ | ||
| "anthropic", | ||
| "claude", | ||
| "claude platform", | ||
| "claude console", | ||
| "claude managed agents", | ||
| "messages api", | ||
| "otlp", | ||
| "opentelemetry", | ||
| "agent tracing", | ||
| ] | ||
| --- | ||
|
|
||
| <Include name="feature-available-open-beta-tracing.mdx" /> | ||
|
|
||
| The Claude Platform exports OpenTelemetry traces for Claude Managed Agents sessions and Messages API requests. Add Sentry as a destination in the Claude Console, and each agent turn, model request, and tool call shows up in [Agents](/product/agents/) in the same Sentry project as your errors and backend spans. You don't need to install a Sentry SDK or change any code. | ||
|
|
||
| OpenTelemetry export on the Claude Platform is in beta, so span names and attributes can change. Console destinations work with the Claude API and Claude Platform on AWS. Requests sent through Amazon Bedrock or Google Cloud Vertex AI aren't traced this way. To trace those, use the Claude SDK instead (see [Trace Your Own Code](#trace-your-own-code)). | ||
|
|
||
| ## Prerequisites | ||
|
|
||
| - A Sentry project for your agent | ||
| - The admin role in a [Claude Console](https://platform.claude.com/) organization | ||
|
|
||
| ## Copy Your Sentry DSN | ||
|
|
||
| Go to [Project settings > Client Keys (DSN)](https://sentry.io/orgredirect/organizations/:orgslug/settings/projects/:projectId/keys/) for the project you want to send traces to, and copy the **DSN**. The Claude Console uses it to find your project's OTLP endpoint and authentication key. | ||
|
|
||
| ## Add Sentry as a Destination | ||
|
|
||
| In the [Claude Console](https://platform.claude.com/), open the **OpenTelemetry** settings page for your organization and click **Add destination**. One destination covers both Claude Managed Agents sessions and Messages API requests. | ||
|
|
||
| - **Provider**: Select **Sentry**. | ||
| - **DSN**: Paste the DSN that you copied. | ||
| - **Content mode**: Select **Full content** to see prompts, responses, and tool input and output in Sentry. Select **Metadata only** to send only timing, status, and token counts. | ||
| - **Set as organization default**: Select this for your first destination. | ||
|
|
||
|  | ||
|
|
||
| To send a workspace's traces to a different Sentry project, add a destination to that workspace. A workspace destination replaces the organization default for that workspace. | ||
|
|
||
| See the [Claude Console docs](https://platform.claude.com/docs/en/manage-claude/opentelemetry#add-a-destination) for all destination options. | ||
|
|
||
| ## Verify Your Setup | ||
|
|
||
| Send a Messages API request with an API key from a workspace that uses the destination, or run a Claude Managed Agents session. After the first traces are sent, the **Delivery** column on the Claude Console OpenTelemetry settings page changes to **Healthy**. | ||
|
|
||
| Then open [**Explore > Agents**](https://sentry.io/orgredirect/organizations/:orgslug/explore/agents/) in Sentry. Your session or request shows up on the **Conversations**, **Traces**, and **LLM Calls** tabs. Select a conversation and open the **Timeline** tab to see each turn, model request, and tool call with its duration and token usage. | ||
|
|
||
|  | ||
|
|
||
| The Claude Platform puts the conversation on agent spans, and tool input and output on tool spans. To read prompts and tool results, select a tool span or open the **Transcript** tab. Model request spans don't include prompts. | ||
|
|
||
| ## Data and Privacy | ||
|
|
||
| Prompts and responses are only sent to Sentry if you select **Full content** for the destination. Sentry stores what it receives under your project's retention and [data scrubbing](/security-legal-pii/scrubbing/) settings. Spans are billed the same way as other Sentry tracing data. | ||
|
|
||
| ## Trace Your Own Code | ||
|
|
||
| The Claude Platform export covers the requests that Claude handles. To also see your application code and the tools it runs for Claude in the same trace, instrument your app with the Claude SDK or a Sentry SDK: | ||
|
|
||
| - [Trace the Claude TypeScript SDK with OpenTelemetry](https://sentry.io/cookbook/trace-claude-typescript-sdk-with-opentelemetry/) | ||
| - [Trace the Claude Python SDK with OpenTelemetry](https://sentry.io/cookbook/trace-claude-python-sdk-with-opentelemetry/) | ||
| - [Sentry Anthropic integration for JavaScript](/platforms/javascript/guides/node/configuration/integrations/anthropic/) | ||
| - [Sentry Anthropic integration for Python](/platforms/python/agent-tracing/anthropic/) | ||
Binary file added
BIN
+127 KB
docs/concepts/otlp/direct/img/claude-platform-otel-console-sentry-destination.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+151 KB
docs/concepts/otlp/direct/img/claude-platform-otel-conversation-timeline.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
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.
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.
@sergical Do we know when this will be out of beta?
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.
no clue https://platform.claude.com/docs/en/manage-claude/opentelemetry