Description
Problem Statement
A typical pattern on an error page, particularly for a global error handler (like a crash dialog), is to show the user the event ID of the crash.
This is useful both if the user is a customer and wants to report that upstream, but even more so when the user is a developer or member of the project.
The challenge with doing that today, particularly with JavaScript, is errors are plentiful, and the only API we provide is something akin to "getLastEvent". That latest event, even if its an error, it may be the wrong event. As we expand data capture, or you more richly instrument your app, this becomes increasingly likely, and thus this implicit API is a little too brittle.
Solution Brainstorm
I'd prefer to have something like:
Sentry.getEventID(error)
How that works internally could vary. Whether its keeping a buffer of errors and their event IDs, or assigning a property to errors (Error._sentryID
).