Uh oh!
There was an error while loading. Please reload this page.
feat(core): Move globals to __SENTRY__ singleton - #11034
Conversation
mydea
commented
Mar 12, 2024
This is good, I also wanted to do that! |
timfish
commented
Mar 12, 2024
Possibly. I was looking through |
AbhiPrasad
commented
Mar 12, 2024
it will as per getsentry/rfcs#122 |
timfish
commented
Mar 12, 2024
Ah, I think it's the What happens when Ahhhhh ok, so are |
mydea
commented
Mar 12, 2024
They are basically the initial current/isolation scope - so if no async context is forked off yet, these will be the ones that are used - exactly! :) |
This PR moves
globalScopeandglobalMetricsAggregatorsto the__SENTRY__global singleton.This means that if the files that these globals are in get bundled or different versions of
@sentry/coreare used, we can be sure that they'll still access the same globals.