Skip to content

Conversation

mydea
Copy link
Member

@mydea mydea commented Sep 16, 2025

I noticed that we actually handled errors in sendEnvelope incorrectly - we would resolve this function with the rejection reason, if sending fails. this does not match the type of TransportMakeRequestResponse, you could actually get something like this out (and the tests actually incorrectly tested this):

// transport.send() rejects with "fetch does not exist"
const res = await client.sendEnvelope(envelope);
// res --> "fetch does not exist" (string)

This PR fixes this to instead resolve with an empty object (which matches the expected return type).

Extracted this out of #17641 because it is actually a bug/fix.

@mydea mydea requested review from chargome and s1gr1d September 16, 2025 09:31
@mydea mydea self-assigned this Sep 16, 2025
Copy link
Contributor

github-actions bot commented Sep 16, 2025

size-limit report 📦

⚠️ Warning: Base artifact is not the latest one, because the latest workflow run is not done yet. This may lead to incorrect results. Try to re-run all tests to get up to date results.

Path Size % Change Change
@sentry/browser 24.16 kB -0.05% -12 B 🔽
@sentry/browser - with treeshaking flags 22.72 kB -0.03% -5 B 🔽
@sentry/browser (incl. Tracing) 40.16 kB -0.03% -10 B 🔽
@sentry/browser (incl. Tracing, Replay) 78.53 kB -0.02% -10 B 🔽
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 68.24 kB -0.01% -4 B 🔽
@sentry/browser (incl. Tracing, Replay with Canvas) 83.19 kB -0.02% -12 B 🔽
@sentry/browser (incl. Tracing, Replay, Feedback) 95.4 kB -0.02% -11 B 🔽
@sentry/browser (incl. Feedback) 40.87 kB -0.03% -11 B 🔽
@sentry/browser (incl. sendFeedback) 28.81 kB -0.04% -10 B 🔽
@sentry/browser (incl. FeedbackAsync) 33.75 kB -0.03% -9 B 🔽
@sentry/react 25.88 kB -0.02% -5 B 🔽
@sentry/react (incl. Tracing) 42.16 kB -0.01% -4 B 🔽
@sentry/vue 28.64 kB -0.04% -11 B 🔽
@sentry/vue (incl. Tracing) 41.98 kB -0.03% -11 B 🔽
@sentry/svelte 24.19 kB -0.05% -11 B 🔽
CDN Bundle 25.74 kB -0.04% -8 B 🔽
CDN Bundle (incl. Tracing) 40.05 kB -0.02% -8 B 🔽
CDN Bundle (incl. Tracing, Replay) 76.27 kB -0.02% -8 B 🔽
CDN Bundle (incl. Tracing, Replay, Feedback) 81.78 kB -0.01% -6 B 🔽
CDN Bundle - uncompressed 75.18 kB -0.02% -15 B 🔽
CDN Bundle (incl. Tracing) - uncompressed 118.5 kB -0.02% -15 B 🔽
CDN Bundle (incl. Tracing, Replay) - uncompressed 233.6 kB -0.01% -16 B 🔽
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 246.37 kB -0.01% -16 B 🔽
@sentry/nextjs (client) 44.15 kB -0.02% -5 B 🔽
@sentry/sveltekit (client) 40.6 kB -0.02% -7 B 🔽
@sentry/node-core 49.86 kB -0.02% -6 B 🔽
@sentry/node 151.14 kB -0.01% -7 B 🔽
@sentry/node - without tracing 91.75 kB -0.01% -3 B 🔽
@sentry/aws-serverless 105.19 kB -0.01% -4 B 🔽

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.
⚠️ Warning: Base artifact is not the latest one, because the latest workflow run is not done yet. This may lead to incorrect results. Try to re-run all tests to get up to date results.

Scenario Requests/s % of Baseline Prev. Requests/s Change %
GET Baseline 9,191 - 8,898 +3%
GET With Sentry 1,400 15% 1,334 +5%
GET With Sentry (error only) 6,082 66% 5,980 +2%
POST Baseline 1,211 - 1,189 +2%
POST With Sentry 522 43% 510 +2%
POST With Sentry (error only) 1,067 88% 1,041 +2%
MYSQL Baseline 3,316 - 3,277 +1%
MYSQL With Sentry 487 15% 484 +1%
MYSQL With Sentry (error only) 2,721 82% 2,627 +4%

View base workflow run

@mydea mydea force-pushed the fn/fix-sendEnvelope branch 2 times, most recently from 0c53b6b to 23b3d40 Compare September 16, 2025 11:26
@mydea mydea requested a review from a team as a code owner September 16, 2025 11:26
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