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
The SDK is designed to run for the lifetime of the app. Dispose as in making it unusable is only a source of problems (ASP.NET Core creates multiple containers and we rely on a resolve of IHub to init the SDK, but when the (first) container is disposed, it disposes also that Hub so if an exception is generated in between that hub being disposed and the new container being created/hub taking over, those errors are lost.
The text was updated successfully, but these errors were encountered:
@SimonCropp is this something you can help us with?
there are multiple environments where this doesn't work well. One of those is using a new DI Scope to get the client, then rethrowing an exception which is captured after that scope is disposed.
System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'SentryClient'.
at Sentry.SentryClient.CaptureTransaction(Transaction transaction) in /_/src/Sentry/SentryClient.cs:line 109
at Sentry.Internal.Hub.CaptureTransaction(Transaction transaction) in /_/src/Sentry/Internal/Hub.cs:line 341
Debug: Configuring the scope.
Debug: Disposing scope.
Error: Failure to capture transaction: e2fce1bb61ee4619
The SDK is designed to run for the lifetime of the app. Dispose as in making it unusable is only a source of problems (ASP.NET Core creates multiple containers and we rely on a resolve of
IHub
to init the SDK, but when the (first) container is disposed, it disposes also that Hub so if an exception is generated in between that hub being disposed and the new container being created/hub taking over, those errors are lost.The text was updated successfully, but these errors were encountered: