Skip to content

Conversation

RulaKhaled
Copy link
Member

@RulaKhaled RulaKhaled commented Sep 16, 2025

✅ This PR depends on #17625 and it should be reviewed only after that one is merged.

This PR adds:

  1. Streaming support for Google GenAI sdk instrumenting the following methods:

    1. Models API Streaming

      • models.generateContentStream() - Stream content generation with real-time chunks
    2. Chat API Streaming (chats.create)

      • chat.sendMessageStream() - Stream chat responses with conversation context
  2. New tool calls attributes

    • GEN_AI_REQUEST_AVAILABLE_TOOLS_ATTRIBUTE - Captures available tools from requests
    • GEN_AI_RESPONSE_TOOL_CALLS_ATTRIBUTE - Captures function calls from responses

Copy link
Contributor

github-actions bot commented Sep 16, 2025

size-limit report 📦

Path Size % Change Change
@sentry/browser 24.23 kB - -
@sentry/browser - with treeshaking flags 22.74 kB - -
@sentry/browser (incl. Tracing) 40.34 kB - -
@sentry/browser (incl. Tracing, Replay) 78.72 kB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 68.38 kB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 83.39 kB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 95.59 kB - -
@sentry/browser (incl. Feedback) 40.95 kB - -
@sentry/browser (incl. sendFeedback) 28.88 kB - -
@sentry/browser (incl. FeedbackAsync) 33.8 kB - -
@sentry/react 25.94 kB - -
@sentry/react (incl. Tracing) 42.32 kB - -
@sentry/vue 28.72 kB - -
@sentry/vue (incl. Tracing) 42.14 kB - -
@sentry/svelte 24.25 kB - -
CDN Bundle 25.74 kB - -
CDN Bundle (incl. Tracing) 40.16 kB - -
CDN Bundle (incl. Tracing, Replay) 76.38 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 81.88 kB - -
CDN Bundle - uncompressed 75.23 kB - -
CDN Bundle (incl. Tracing) - uncompressed 118.89 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 234.01 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 246.78 kB - -
@sentry/nextjs (client) 44.34 kB - -
@sentry/sveltekit (client) 40.76 kB - -
@sentry/node-core 49.98 kB - -
@sentry/node 152.72 kB +0.36% +536 B 🔺
@sentry/node - without tracing 91.88 kB - -
@sentry/aws-serverless 105.33 kB - -

View base workflow run

Copy link
Contributor

github-actions bot commented Sep 16, 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,307 - 8,789 +6%
GET With Sentry 1,438 15% 1,360 +6%
GET With Sentry (error only) 6,127 66% 5,924 +3%
POST Baseline 1,215 - 1,201 +1%
POST With Sentry 528 43% 516 +2%
POST With Sentry (error only) 1,045 86% 1,035 +1%
MYSQL Baseline 3,297 - 3,265 +1%
MYSQL With Sentry 493 15% 433 +14%
MYSQL With Sentry (error only) 2,678 81% 2,673 +0%

View base workflow run

@RulaKhaled RulaKhaled force-pushed the instrument-genai-google-stream branch from 6191940 to 3e617c7 Compare September 16, 2025 12:45
@RulaKhaled RulaKhaled changed the title feat(core): Support stream responses for Google GenAI feat(core): Support stream responses and tool calls for Google GenAI Sep 16, 2025
@RulaKhaled RulaKhaled changed the title feat(core): Support stream responses and tool calls for Google GenAI WIP feat(core): Support stream responses and tool calls for Google GenAI Sep 19, 2025
@RulaKhaled RulaKhaled force-pushed the instrument-genai-google-stream branch from 8f8e784 to 25d87ea Compare September 19, 2025 13:37
@RulaKhaled RulaKhaled marked this pull request as ready for review September 22, 2025 06:36
cursor[bot]

This comment was marked as outdated.

@RulaKhaled RulaKhaled force-pushed the instrument-genai-google-stream branch from dcb208a to 1baed6e Compare September 22, 2025 06:53
@RulaKhaled RulaKhaled changed the title WIP feat(core): Support stream responses and tool calls for Google GenAI feat(core): Support stream responses and tool calls for Google GenAI Sep 22, 2025
cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

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.

1 participant