Skip to content

Conversation

@RulaKhaled
Copy link
Member

@RulaKhaled RulaKhaled commented Aug 26, 2025

This PR adds support for streamed Anthropic Messages API responses in the Core AI instrumentation. It detects streaming via messages.create({…, stream: true}) and messages.stream(...), and marks spans with stream related attributes. It also aggregates token usage from stream events and records streamed text when PII capture is enabled.

@RulaKhaled RulaKhaled changed the title Stream responses antropic ai Stream responses Anthropic ai Aug 26, 2025
@RulaKhaled RulaKhaled force-pushed the stream-responses-antropic-ai branch from c47c2dc to 41b38aa Compare August 26, 2025 08:56
@RulaKhaled RulaKhaled changed the title Stream responses Anthropic ai feat(core): Stream responses Anthropic ai Aug 26, 2025
@RulaKhaled RulaKhaled changed the title feat(core): Stream responses Anthropic ai feat(core): Stream responses Anthropic AI Aug 26, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Aug 26, 2025

size-limit report 📦

Path Size % Change Change
@sentry/browser 24.16 kB - -
@sentry/browser - with treeshaking flags 22.73 kB - -
@sentry/browser (incl. Tracing) 39.87 kB - -
@sentry/browser (incl. Tracing, Replay) 78.04 kB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 67.88 kB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 82.73 kB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 94.85 kB - -
@sentry/browser (incl. Feedback) 40.83 kB - -
@sentry/browser (incl. sendFeedback) 28.81 kB - -
@sentry/browser (incl. FeedbackAsync) 33.7 kB - -
@sentry/react 25.88 kB - -
@sentry/react (incl. Tracing) 41.86 kB - -
@sentry/vue 28.64 kB - -
@sentry/vue (incl. Tracing) 41.69 kB - -
@sentry/svelte 24.18 kB - -
CDN Bundle 25.66 kB - -
CDN Bundle (incl. Tracing) 39.75 kB - -
CDN Bundle (incl. Tracing, Replay) 75.87 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 81.31 kB - -
CDN Bundle - uncompressed 74.96 kB - -
CDN Bundle (incl. Tracing) - uncompressed 117.59 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 231.95 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 244.55 kB - -
@sentry/nextjs (client) 43.89 kB - -
@sentry/sveltekit (client) 40.32 kB - -
@sentry/node-core 47.99 kB - -
@sentry/node 148.97 kB +0.37% +542 B 🔺
@sentry/node - without tracing 92.24 kB - -
@sentry/aws-serverless 104.46 kB -0.01% -2 B 🔽

View base workflow run

@RulaKhaled RulaKhaled force-pushed the stream-responses-antropic-ai branch from 0adbf09 to b672f40 Compare August 26, 2025 10:17
@RulaKhaled RulaKhaled marked this pull request as ready for review August 27, 2025 08:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants