-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Get Sentry-like error reporting working #5091
Comments
We will release the Sentry SDK this week - Most things work (manually) once this lands we'll shoot out an update supporting it. Few users already asked for Sentry Bun SDK 😅 |
We just shipped https://www.npmjs.com/package/@sentry/bun as part of https://github.com/getsentry/sentry-javascript/releases/tag/7.70.0.
|
I don't want to spam here 😅 but with version |
#7472 still seems to be an issue with:
|
I'm aware that the team has lots of things to work on, but I'd like to say that this is likely a blocker for many to use Bun in production. |
This comment was marked as duplicate.
This comment was marked as duplicate.
I agree with @GingerAdonis, this is very important for many devs. Do you guys have any estimates on when this could potentially be fixed? |
Add support for global onUnhandled Error/Promise for Bun. ```javascript import * as Sentry from "@sentry/bun"; Sentry.init({ dsn: "DSN", }); console.log("Hello via Bun!"); throw new Error('Unhandled Bun Sentry Error!'); ``` <img width="1063" alt="image" src="https://github.com/getsentry/sentry-javascript/assets/363802/fd90969f-82a4-4300-a67e-1ebb5cf540fa"> ref: oven-sh/bun#5091
Add support for global onUnhandled Error/Promise for Bun. ```javascript import * as Sentry from "@sentry/bun"; Sentry.init({ dsn: "DSN", }); console.log("Hello via Bun!"); throw new Error('Unhandled Bun Sentry Error!'); ``` <img width="1063" alt="image" src="https://github.com/getsentry/sentry-javascript/assets/363802/fd90969f-82a4-4300-a67e-1ebb5cf540fa"> ref: oven-sh/bun#5091
In latest 7.x and 8.x versions of Please reach out if something looks off, thanks for all the patience everyone! https://docs.sentry.io/platforms/javascript/guides/bun https://docs.sentry.io/platforms/javascript/guides/bun/migration/v7-to-v8 |
Add support for global onUnhandled Error/Promise for Bun. ```javascript import * as Sentry from "@sentry/bun"; Sentry.init({ dsn: "DSN", }); console.log("Hello via Bun!"); throw new Error('Unhandled Bun Sentry Error!'); ``` <img width="1063" alt="image" src="https://github.com/getsentry/sentry-javascript/assets/363802/fd90969f-82a4-4300-a67e-1ebb5cf540fa"> ref: oven-sh/bun#5091
https://nodejs.org/api/process.html#event-uncaughtexceptionmonitor
process.on("unhandledRejection", cb)
process.on("unhandledException", cb)
process.on("uncaughtExceptionMonitor", cb)
process.setUncaughtExceptionCaptureCallback(cb)
This lets Sentry get error reporting working.
Ideally, the fix would go here:
bun/src/bun.js/javascript.zig
Lines 629 to 640 in 7ce7f08
We would add an unhandled rejection scope for either rejections or exceptions and have some way to distinguish between the two. This one would call into JS potentially for multiple handlers. The part that gets a little tricky is in unit tests where we rely on this behavior for
expect().toThrow()
cc @dcramer
The text was updated successfully, but these errors were encountered: