Skip to content

Conversation

RulaKhaled
Copy link
Member

@RulaKhaled RulaKhaled commented Aug 28, 2025

This PR adds missing tool call attributes, we add gen_ai.response.tool_calls attribute for Anthropic AI, supporting both streaming and non-streaming requests.

Core changes:

Request Side - Capture available tools:

  • Extract tools extract from request params
  • Set gen_ai.request.available_tools attribute

Response Side - Capture actual tool calls:

  • Extract from response.tool_calls
  • Set gen_ai.response.tool_calls attribute for both

Streaming Support (in streaming.ts):

  • Accumulation of tool calls during streaming
  • Respects recordOutputs privacy setting

Copy link
Contributor

github-actions bot commented Aug 28, 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.23 kB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 68.02 kB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 82.91 kB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 95.11 kB - -
@sentry/browser (incl. Feedback) 40.89 kB - -
@sentry/browser (incl. sendFeedback) 28.81 kB - -
@sentry/browser (incl. FeedbackAsync) 33.75 kB - -
@sentry/react 25.88 kB +0.01% +1 B 🔺
@sentry/react (incl. Tracing) 41.89 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) 76.03 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 81.5 kB - -
CDN Bundle - uncompressed 74.96 kB - -
CDN Bundle (incl. Tracing) - uncompressed 117.59 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 232.69 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 245.45 kB - -
@sentry/nextjs (client) 43.89 kB - -
@sentry/sveltekit (client) 40.33 kB - -
@sentry/node-core 49.61 kB +0.01% +1 B 🔺
@sentry/node 150.6 kB +0.23% +331 B 🔺
@sentry/node - without tracing 92.18 kB +0.01% +1 B 🔺
@sentry/aws-serverless 105.48 kB - -

View base workflow run

@RulaKhaled RulaKhaled force-pushed the tool-calls-anthropic branch from 32493bf to dba165f Compare August 28, 2025 16:07
@RulaKhaled RulaKhaled force-pushed the tool-calls-anthropic branch from dba165f to 8c194ca Compare August 28, 2025 16:08
@RulaKhaled RulaKhaled marked this pull request as ready for review August 29, 2025 08:57
cursor[bot]

This comment was marked as outdated.

@RulaKhaled RulaKhaled changed the title [WIP] feat(core): Add tool calls attributes for Anthropic AI eat(core): Add tool calls attributes for Anthropic AI Aug 29, 2025
@RulaKhaled RulaKhaled changed the title eat(core): Add tool calls attributes for Anthropic AI feat(core): Add tool calls attributes for Anthropic AI Aug 29, 2025
@mydea mydea requested a review from andreiborza September 2, 2025 12:52
cursor[bot]

This comment was marked as outdated.

Copy link
Contributor

github-actions bot commented Sep 4, 2025

node-overhead report 🧳

Note: This is a synthetic benchmark with a minimal express app and does not necessarily reflect the real-world performance impact in an application.

Scenario Requests/s % of Baseline Prev. Requests/s Change %
GET Baseline 9,612 - 8,687 +11%
GET With Sentry 1,352 14% 1,275 +6%
GET With Sentry (error only) 6,094 63% 5,998 +2%
POST Baseline 1,220 - 1,142 +7%
POST With Sentry 498 41% 496 +0%
POST With Sentry (error only) 1,082 89% 984 +10%
MYSQL Baseline 3,461 - 3,247 +7%
MYSQL With Sentry 469 14% 435 +8%
MYSQL With Sentry (error only) 2,807 81% 2,648 +6%

View base workflow run

@RulaKhaled RulaKhaled merged commit 9e70a5a into develop Sep 4, 2025
535 of 550 checks passed
@RulaKhaled RulaKhaled deleted the tool-calls-anthropic branch September 4, 2025 11:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants