-
Notifications
You must be signed in to change notification settings - Fork 50
feat: Add Sentry #36
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
feat: Add Sentry #36
Conversation
packages/unplugin/src/index.ts
Outdated
| import "@sentry/tracing"; | ||
|
|
||
| Sentry.init({ | ||
| dsn: "https://1298ac2f87bc4aae99d9a9a94ce65b42@o447951.ingest.sentry.io/6681372", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this dns is intentionally not an env var. I decided to keep it here as this is a public info and we should be transparent about this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree!
|
This PR is veeery cool. I love that we have tracing for the hooks 👌 I have to look at this in more detail tho: My concern right now is that if we use the top-level |
|
Another thought. We should give users an option to turn this error reporting off. Especially during the build process, there are some things you don't necessarily want to leak (i.e. secrets etc.). |
Yeah that's it. You can have traces across projects but not across orgs afaik. |
|
That looks awesome @vladanpaunovic! The transaction looks just like I had imagined :D Anyway, I'm +1 on making a custom client (let's try to have a minimal setup, no or only necessary integrations) and making this opt-out for users |
5f91271 to
809a576
Compare
66de45c to
867fe26
Compare
| } catch (e) { | ||
| // TODO: Maybe do some more sopthisticated error handling here | ||
| throw new Error(`Something went wrong while uploading file ${filename}`); | ||
| Sentry.captureException(e); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should rethrow the errors happening here (and in the other api calls), otherwise they won't bubble up to the .catch in the post build hook.
This PR adds Sentry integration to sentry-unplugin.
This will allow us to proactively monitor and get alerted about our customers errors.
Error page:
Performance:
Side note so I don't forget:
I would have expected to get distributed tracing when making requests to sentry API as we are sending
sentry-trace. Let's discuss why this could happen. Different org maybe?