-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
ref(docs): Restructure Anthropic integration documentation #16047
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
base: master
Are you sure you want to change the base?
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
|
|
||
| _Import name: `Sentry.anthropicAIIntegration`_ | ||
|
|
||
| The `anthropicAIIntegration` adds instrumentation for the `@anthropic-ai/sdk` API to capture spans by wrapping Anthropic client calls and recording LLM interactions. |
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 `anthropicAIIntegration` adds instrumentation for the `@anthropic-ai/sdk` API to capture spans by wrapping Anthropic client calls and recording LLM interactions. | |
| The `anthropicAIIntegration` adds instrumentation for the `@anthropic-ai/sdk` SDK to capture spans by wrapping Anthropic client calls and recording LLM interactions. |
l: Maybe SDK? Reads kind of weird as API, feel free to disregard tho. Maybe @inventarSarah has another opinion.
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.
Yes, I'd also opt for "SDK"👍
| <Alert> | ||
|
|
||
| This integration works in the Node.js, Cloudflare Workers, Vercel Edge Functions, and browser runtimes. It requires SDK version `10.12.0` or higher. | ||
| This integration is **enabled by default for Node.js-based platforms** and automatically captures spans for Anthropic API method calls. It requires SDK version `10.12.0` or higher. |
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.
Q: Couldn't we just conditionally reword this and show it for environments where it's enabled by default via PlatformSelection? e.g.
This integration is enabled by default and automatically captures spans for Anthropic API method calls [..]
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.
Can you please also add which SDK we mean here:
It requires SDK version 10.12.0 or higher.
|
|
||
| <PlatformSection supported={["javascript"]}> | ||
| For browser applications, you need to manually instrument the Anthropic client using the `instrumentAnthropicAiClient` helper: | ||
| The `instrumentAnthropicAiClient` helper adds instrumentation for the `@anthropic-ai/sdk` API to capture spans by wrapping Anthropic client calls and recording LLM interactions with configurable input/output recording. You need to manually wrap your Anthropic client instance with this helper. See example below: |
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 `instrumentAnthropicAiClient` helper adds instrumentation for the `@anthropic-ai/sdk` API to capture spans by wrapping Anthropic client calls and recording LLM interactions with configurable input/output recording. You need to manually wrap your Anthropic client instance with this helper. See example below: | |
| The `instrumentAnthropicAiClient` helper adds instrumentation for the `@anthropic-ai/sdk` SDK to capture spans by wrapping Anthropic client calls and recording LLM interactions with configurable input/output recording. You need to manually wrap your Anthropic client instance with this helper. See example below: |
m: Above you're talking about "Anthropic API method calls", but here's you're just mentioning "Anthropic client calls". Can we align these?
| </PlatformSection> | ||
|
|
||
| _Type: `boolean`_ | ||
| <PlatformSection supported={["javascript", "javascript.react", "javascript.angular", "javascript.vue", "javascript.svelte", "javascript.solid", "javascript.ember", "javascript.gatsby", "javascript.nextjs", "javascript.nuxt", "javascript.solidstart", "javascript.sveltekit", "javascript.react-router", "javascript.remix", "javascript.astro", "javascript.tanstackstart-react", "javascript.electron", "javascript.cloudflare"]}> |
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.
l: Maybe we can invert this and just use notSupported={["javascript.node"]}, as far as I can tell, that's the only SDK where we can for sure tell that users don't need to know about manual instrumentation, right?
| By default this integration adds tracing support to Anthropic API method calls including: | ||
| ## Supported Operations | ||
|
|
||
| By default, tracing support is added to the following Anthropic API method calls: |
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.
l: Same request around aligning messaging around "Anthropic API method calls"
| ``` | ||
|
|
||
| </PlatformSection> | ||
| Streaming and non-streaming requests are automatically detected and handled appropriately. |
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.
Q: do we need to explain what "handled appropriately" means?
coolguyzone
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.
LGTM
closes https://linear.app/getsentry/issue/TET-1738/anthropic-ai-integration-restructure-and-improve-docs