-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
captureException() creates an issue, logged with one event ID, but returns a non-existent event ID. #6229
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
Comments
FWIW, we have another issue with transactions that may be related. Writing the issue for that right now. |
Hi @FxllenCode thanks for writing in! You could try disabling our Sentry.init({
// ...
integrations: (integrations) => {
return integrations.filter(i => i.name !== 'OnUnhandledRejection')
}
}); Let me know if this helps |
Hi @Lms24! Thanks for the quick response!
To my knowledge, it only happens in that situation. Disabling the integration is a workaround, but we still want to send other events that are unhandled to Sentry, so it does not work for our usecase. |
Hi, @FxllenCode. In your screenshots, it's the the events tab within an issue, correct? Can you please try the same It looks like you're implementing your own handler just so you can get the event id and post to the webhook. Is that true? If so, a better solution would be to add an event processor which does the same thing: Sentry.init(...);
Sentry.addGlobalEventProcessor(event => {
// read id off of event object
// post to webhook
return event;
}); Can you please try that and let us know what happens? |
That did not resolve the issue in our case, thanks for trying though!
Is this documented anywhere? This seems nice - but might not be in our niche usecase. I've brought it up with our other team members to take a look at it. Would be nice if the feature worked as intended however! |
If the event processor doesn't work, you could try turning off the Event processors are documented here: https://docs.sentry.io/platforms/javascript/enriching-events/event-processors/. (The code for setting a global event processor is slightly different, but it works the same way.) Also, heads up: I forgot a very important line in my snippet above. You have to return the event or it won't go through! Sorry 'bout that. I've updated it to fix that. |
This issue has gone three weeks without activity. In another week, I will close it. But! If you comment or otherwise update it, I will reset the clock, and if you label it "A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀 |
Uh, you require the event ID now in How do I get the correct event ID? Why is this issue closed without fixing? This is a critical issue. See also: #1940 |
Hey @Lms24 and @lobsterkatie, @ADTC reached out to us in regards to the different event IDs. Could I get a word on how the user could resolve or get around this issue? |
Hey @ADTC, Since version 8.1.0 of the SDK, It's important to note though that regardless of getting the id by calling
The underlying reason for this is that the SDK does not await the response of our backend ingestion service Relay when sending requests with the events to get back the "final" eventId. Instead it generates the id of the event right at the beginning and this is the Id you get back through the APIs mentioned above. Usually, if the event is not dropped along the way, this will be the id that ends up in Sentry. However, as you can see here, it's not always the case. You can listen to a mostly internal SDK event that fires after the event was sent to Sentry. This should rule out cases where the event is getting dropped from the SDK. However, Relay or our backend in general could still filter out the event. Sentry.getCurrentScope().getClient()?.on("afterSendEvent", (event) => {
if (!event.type) { // only show the dialog for error events
Sentry.showReportDialog({ eventId: event.event_id });
}
}); |
Is there an existing issue for this?
How do you use Sentry?
SaaS/Paid Plan
Which package are you using?
@sentry/node
SDK Version
7.20.0
Framework Version
No response
Link to Sentry event
https://sentry.io/organizations/status-plus/issues/3573587519/events/88bf7d9ee40946ff8d9755980849758a/events/?project=6159258
Steps to Reproduce
issue.id
to the user.Expected Result
When we go to Sentry,io and search for events, we should find an event with this hash.
Actual Result
There is no event with the event ID given to the user. Furthermore, an issue is created, but the event IDs do not match up:
The text was updated successfully, but these errors were encountered: