Improve how eventIDs
are created and propogated.
#4571
Labels
Package: core
Issues related to the Sentry Core SDK
Milestone
Right now there's a lot of redundancy on how eventIDs are created and used. We can maybe simplify this to reduce bundle size.
hub.captureException
first creates an eventID and passes it as a hint.sentry-javascript/packages/hub/src/hub.ts
Line 188 in 1bf9883
This then calls
client.captureException
which grabs the eventID from the hint, passes that hint down, overwrites the eventID, and then returns thatsentry-javascript/packages/core/src/baseclient.ts
Lines 115 to 126 in 9e87bf9
eventFromException
sets the eventID on the event based on the hintsentry-javascript/packages/browser/src/eventbuilder.ts
Lines 20 to 31 in 9e87bf9
client._captureEvent
returns the id on the eventsentry-javascript/packages/core/src/baseclient.ts
Lines 499 to 509 in 9e87bf9
client._processEvent
prepares the event:sentry-javascript/packages/core/src/baseclient.ts
Line 555 in 9e87bf9
which grabs the event id from the event, the hint, or generates a new one.
sentry-javascript/packages/core/src/baseclient.ts
Line 352 in 9e87bf9
The text was updated successfully, but these errors were encountered: