Title: Anthropic message stream events unhandled · Issue #17734 · getsentry/sentry-javascript · GitHub
Open Graph Title: Anthropic message stream events unhandled · Issue #17734 · getsentry/sentry-javascript
X Title: Anthropic message stream events unhandled · Issue #17734 · getsentry/sentry-javascript
Description: Is there an existing issue for this? I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues I have reviewed the documentation https://docs.sentry.io/ I am using the latest SDK release https://github.com/...
Open Graph Description: Is there an existing issue for this? I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues I have reviewed the documentation https://docs.sentry.io/ I am using th...
X Description: Is there an existing issue for this? I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues I have reviewed the documentation https://docs.sentry.io/ I am using th...
Opengraph URL: https://github.com/getsentry/sentry-javascript/issues/17734
X: @github
Domain: github.com
IPv4 address: 140.82.112.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Anthropic message stream events unhandled","articleBody":"### Is there an existing issue for this?\n\n- [x] I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues\n- [x] I have reviewed the documentation https://docs.sentry.io/\n- [x] I am using the latest SDK release https://github.com/getsentry/sentry-javascript/releases\n\n### How do you use Sentry?\n\nSentry Saas (sentry.io)\n\n### Which SDK are you using?\n\n@sentry/browser\n\n### SDK Version\n\n10.13.0\n\n### Framework Version\n\nNodeJS 20.19.0\n\n### Link to Sentry event\n\n_No response_\n\n### Reproduction Example/SDK Setup\n\n```typescript\nSentry.init({\n dsn: Config.SENTRY_DSN,\n integrations: [\n // Add the OpenAI integration\n Sentry.openAIIntegration({\n recordInputs: true,\n recordOutputs: true,\n }),\n Sentry.anthropicAIIntegration({\n recordInputs: true,\n recordOutputs: true,\n })\n ],\n tracesSampleRate: sampleRate,\n profilesSampleRate: sampleRate,\n environment: environmentName\n })\n```\n\n### Steps to Reproduce\n\n1. Install @sentry/node v10.7.0 or later\n2. Initialize Anthropic\n3. Call `anthropic.messages.stream()` with streaming parameters using `.on()` event handlers\n\n```typescript\nimport Anthropic from '@anthropic-ai/sdk';\n\nconst client = new Anthropic();\n\nconst stream = await client.messages.stream(streamParams)\n .on('streamEvent', (messageStreamEvent, snapshot) => {\n // Handle streamEvent\n })\n```\n\n### Expected Result\n\nCall succeeds and sends message to Anthropic, while listening for `streamEvent` type.\n\n### Actual Result\n\nError thrown with message:\n> TypeError: this.anthropic.messages.stream(...).on is not a function\n\n### Additional Context\n\nEvent handlers (i.e. `.on()`) are consistent with Anthropic's [docs on streaming messages](https://docs.claude.com/en/docs/build-with-claude/streaming#streaming-with-sdks) using their Node SDK. \n\nThis worked fine in @sentry/node v10.6.0 but has been broken since v10.7.0. It may be related to this PR: https://github.com/getsentry/sentry-javascript/pull/17460\n\n\u003csub>Tip: React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding `+1` or `me too`, to help us triage it.\u003c/sub>","author":{"url":"https://github.com/adoxner","@type":"Person","name":"adoxner"},"datePublished":"2025-09-22T15:19:36Z","url":"https://github.com/getsentry/sentry-javascript/issues/17734"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:44a1bcd1-6c1d-9b68-f6bc-b37505222337 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 98DE:39F5E8:4ACB:6374:6B050494 |
| html-safe-nonce | 8795de8c995c4a31d988dd7a71fcfa6c87ac008bc4c1bad5aa0cee1b3093c469 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5OERFOjM5RjVFODo0QUNCOjYzNzQ6NkIwNTA0OTQiLCJ2aXNpdG9yX2lkIjoiMTU1ODU0ODY4MDM3NjkxMDk5NiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | a0d65e64ab5769629324bed919a6f00ee6fb923270817be2a7dede5c33c3a733 |
| hovercard-subject-tag | issue:3441505248 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/getsentry/sentry-javascript/17734/issue_layout |
| twitter:image | https://opengraph.githubassets.com/8416b50caadb334a99ccad93df01ed283d03031cd04a4038e5a1dcf62c40b681/getsentry/sentry-javascript/issues/17734 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/8416b50caadb334a99ccad93df01ed283d03031cd04a4038e5a1dcf62c40b681/getsentry/sentry-javascript/issues/17734 |
| og:image:alt | Is there an existing issue for this? I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues I have reviewed the documentation https://docs.sentry.io/ I am using th... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | adoxner |
| hostname | github.com |
| expected-hostname | github.com |
| None | 854d880890b5e847b3fce9d1b31f032107baeddeebad2aa379c48aa4f1451f6b |
| turbo-cache-control | no-preview |
| go-import | github.com/getsentry/sentry-javascript git https://github.com/getsentry/sentry-javascript.git |
| octolytics-dimension-user_id | 1396951 |
| octolytics-dimension-user_login | getsentry |
| octolytics-dimension-repository_id | 3328572 |
| octolytics-dimension-repository_nwo | getsentry/sentry-javascript |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 3328572 |
| octolytics-dimension-repository_network_root_nwo | getsentry/sentry-javascript |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 220e980097d94ce616d5d11fbd5316d208e3fc93 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width