-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
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/getsentry/sentry-javascript/releases
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/browser
SDK Version
10.13.0
Framework Version
NodeJS 20.19.0
Link to Sentry event
No response
Reproduction Example/SDK Setup
Sentry.init({
dsn: Config.SENTRY_DSN,
integrations: [
// Add the OpenAI integration
Sentry.openAIIntegration({
recordInputs: true,
recordOutputs: true,
}),
Sentry.anthropicAIIntegration({
recordInputs: true,
recordOutputs: true,
})
],
tracesSampleRate: sampleRate,
profilesSampleRate: sampleRate,
environment: environmentName
})
Steps to Reproduce
- Install @sentry/node v10.7.0 or later
- Initialize Anthropic
- Call
anthropic.messages.stream()
with streaming parameters using.on()
event handlers
import Anthropic from '@anthropic-ai/sdk';
const client = new Anthropic();
const stream = await client.messages.stream(streamParams)
.on('streamEvent', (messageStreamEvent, snapshot) => {
// Handle streamEvent
})
Expected Result
Call succeeds and sends message to Anthropic, while listening for streamEvent
type.
Actual Result
Error thrown with message:
TypeError: this.anthropic.messages.stream(...).on is not a function
Additional Context
Event handlers (i.e. .on()
) are consistent with Anthropic's docs on streaming messages using their Node SDK.
This worked fine in @sentry/node v10.6.0 but has been broken since v10.7.0. It may be related to this PR: #17460
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.
Metadata
Metadata
Assignees
Projects
Status
No status