You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
_options.LogWarning("Push scope called in global mode, returning.");
returnDisabledHub.Instance;
}
Ao if someone did something like:
privatevoidOnButtonClick(EventArgsargs){usinglockedHub=hub.PushAndLoclScope();// Do some work}
...in GlobalMode, the instance of DisabledHub would be disposed of when this event handler completed.
I'm assuming we would never want that to happen. We could prevent this by returning some kind of FakeDisposable from HubExtensions.PushAndLockScope if GlobalMode was enabled.
The text was updated successfully, but these errors were encountered:
Bit of an edge case but I just bumped into this:
sentry-dotnet/src/Sentry/HubExtensions.cs
Line 168 in 34d8490
LockedScope is defined as:
sentry-dotnet/src/Sentry/HubExtensions.cs
Lines 186 to 197 in 34d8490
In GlobalMode,
hub.PushScope()
returnsDisabledHub.Instance
:sentry-dotnet/src/Sentry/Internal/SentryScopeManager.cs
Lines 49 to 55 in 941d9dc
Ao if someone did something like:
...in GlobalMode, the instance of
DisabledHub
would be disposed of when this event handler completed.I'm assuming we would never want that to happen. We could prevent this by returning some kind of
FakeDisposable
fromHubExtensions.PushAndLockScope
if GlobalMode was enabled.The text was updated successfully, but these errors were encountered: