Skip to content

Conversation

mydea
Copy link
Member

@mydea mydea commented Sep 17, 2025

Noticed while working on #17679, we incorrectly changed the this context here (which is also why TS complained).

I rewrote this to a proxy which should keep the context properly.

Copy link
Contributor

github-actions bot commented Sep 17, 2025

size-limit report 📦

Path Size % Change Change
@sentry/browser 24.16 kB - -
@sentry/browser - with treeshaking flags 22.72 kB - -
@sentry/browser (incl. Tracing) 40.16 kB - -
@sentry/browser (incl. Tracing, Replay) 78.53 kB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 68.24 kB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 83.19 kB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 95.4 kB - -
@sentry/browser (incl. Feedback) 40.87 kB - -
@sentry/browser (incl. sendFeedback) 28.81 kB - -
@sentry/browser (incl. FeedbackAsync) 33.75 kB - -
@sentry/react 25.88 kB - -
@sentry/react (incl. Tracing) 42.16 kB - -
@sentry/vue 28.64 kB - -
@sentry/vue (incl. Tracing) 41.98 kB - -
@sentry/svelte 24.19 kB - -
CDN Bundle 25.74 kB - -
CDN Bundle (incl. Tracing) 40.05 kB - -
CDN Bundle (incl. Tracing, Replay) 76.27 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 81.78 kB - -
CDN Bundle - uncompressed 75.18 kB - -
CDN Bundle (incl. Tracing) - uncompressed 118.5 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 233.6 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 246.37 kB - -
@sentry/nextjs (client) 44.15 kB - -
@sentry/sveltekit (client) 40.6 kB - -
@sentry/node-core 49.86 kB - -
@sentry/node 151.15 kB +0.01% +12 B 🔺
@sentry/node - without tracing 91.75 kB -0.01% -1 B 🔽
@sentry/aws-serverless 105.19 kB - -

View base workflow run

Copy link
Contributor

github-actions bot commented Sep 17, 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,559 - 9,123 +5%
GET With Sentry 1,415 15% 1,403 +1%
GET With Sentry (error only) 6,084 64% 5,918 +3%
POST Baseline 1,208 - 1,205 +0%
POST With Sentry 532 44% 528 +1%
POST With Sentry (error only) 1,065 88% 1,049 +2%
MYSQL Baseline 3,361 - 3,292 +2%
MYSQL With Sentry 512 15% 461 +11%
MYSQL With Sentry (error only) 2,722 81% 2,625 +4%

View base workflow run

@mydea mydea merged commit c0f0375 into develop Sep 17, 2025
170 checks passed
@mydea mydea deleted the fn/fix-ai-this branch September 17, 2025 12:21
mydea added a commit that referenced this pull request Sep 17, 2025
I've seen a few places where we are wrapping things that could be sync
or async, and we want to do something with the return value. By adding
an onSuccess handler to `handelCallbackErrors` we can handle this more
generically in the future:

```js
const wrapped = handleCallbackErrors(
  () => fn(), 
  // error handler
  (_err) => {}, 
  // finally handler
  () => {},
  // success handler, gets value or resolved value if function returns a promise
  (_value) => {}
);
```

While scanning a bit for places where we could already use this, I also
found two bugs around this, opened separate PRs for them:
* #17680
* #17681
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