Skip to content

Conversation

mydea
Copy link
Member

@mydea mydea commented Sep 18, 2025

This avoids looking up the integration for openai instrumentation, instead relying on this being passed in (which it already is). When manually instrumenting the client you need to pass in the options directly.

  1. Node: Options are passed from the integration to instrumentOpenAiClient anyhow, so nothing changes
  2. cloudflare/vercel-edge: There is no integration, users need to manually call instrumentOpenAiClient() and pass in the options anyhow (no integration to look anything up from exists there)

See also #17694

TODO: Update test similar to #17694

@mydea mydea requested a review from RulaKhaled September 18, 2025 09:57
@mydea mydea self-assigned this Sep 18, 2025
Copy link
Contributor

size-limit report 📦

Path Size % Change Change
@sentry/browser 24.15 kB - -
@sentry/browser - with treeshaking flags 22.73 kB - -
@sentry/browser (incl. Tracing) 40.17 kB - -
@sentry/browser (incl. Tracing, Replay) 78.55 kB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 68.26 kB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 83.21 kB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 95.41 kB - -
@sentry/browser (incl. Feedback) 40.87 kB - -
@sentry/browser (incl. sendFeedback) 28.81 kB - -
@sentry/browser (incl. FeedbackAsync) 33.74 kB - -
@sentry/react 25.88 kB - -
@sentry/react (incl. Tracing) 42.18 kB - -
@sentry/vue 28.64 kB - -
@sentry/vue (incl. Tracing) 41.99 kB - -
@sentry/svelte 24.19 kB - -
CDN Bundle 25.74 kB - -
CDN Bundle (incl. Tracing) 40.04 kB - -
CDN Bundle (incl. Tracing, Replay) 76.26 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 81.77 kB - -
CDN Bundle - uncompressed 75.21 kB - -
CDN Bundle (incl. Tracing) - uncompressed 118.56 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 233.69 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 246.45 kB - -
@sentry/nextjs (client) 44.16 kB - -
@sentry/sveltekit (client) 40.61 kB - -
@sentry/node-core 49.9 kB - -
@sentry/node 151.12 kB -0.05% -74 B 🔽
@sentry/node - without tracing 91.81 kB - -
@sentry/aws-serverless 105.26 kB - -

View base workflow run

Copy link
Contributor

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 8,893 - 9,026 -1%
GET With Sentry 1,377 15% 1,344 +2%
GET With Sentry (error only) 6,083 68% 5,875 +4%
POST Baseline 1,214 - 1,160 +5%
POST With Sentry 527 43% 512 +3%
POST With Sentry (error only) 1,044 86% 1,013 +3%
MYSQL Baseline 3,304 - 3,244 +2%
MYSQL With Sentry 447 14% 372 +20%
MYSQL With Sentry (error only) 2,667 81% 2,615 +2%

View base workflow run

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