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
How do you use Sentry?
Sentry SaaS (sentry.io) or self-hosted/on-premise (which version?)
Sentry on-premise 3.11.0, used for performance and error logging
Which SDK and version?
e.g: JavaScript 5.11.1, .NET 1.2.0
.NET 6.0, Sentry.AspNetCore 3.11.0
Steps to Reproduce
Run multiple instances of asp.net core's web server.
Expected Result
Sentry reports data for all instances
Actual Result
Sentry throws System.OperationCancelledException:
Sentry.ISentryClient: Information:Disposingthe Hub.
Exception happened: System.OperationCanceledException
at Sentry.Internal.BackgroundWorker.WorkerAsync()in/_/src/Sentry/Internal/BackgroundWorker.cs:line 90
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.AsyncStateMachineBox`1.ExecutionContextCallback(Object s)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.AsyncStateMachineBox`1.MoveNext(Thread threadPoolThread)
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.AsyncStateMachineBox`1.MoveNext()
at System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(IAsyncStateMachineBox box, Boolean allowInlining)
at System.Threading.Tasks.Task.RunContinuations(Object continuationObject)
at System.Threading.Tasks.Task.FinishContinuations()
at System.Threading.Tasks.Task.FinishStageThree()
at System.Threading.Tasks.Task.CancellationCleanupLogic()
at System.Threading.Tasks.Task.TrySetCanceled(CancellationToken tokenToRecord, Object cancellationException)
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.SetException(Exception exception, Task`1&taskField)
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.SetException(Exception exception)
at System.Threading.SemaphoreSlim.WaitUntilCountOrTimeoutAsync(TaskNode asyncWaiter, Int32 millisecondsTimeout, CancellationToken cancellationToken)
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.AsyncStateMachineBox`1.ExecutionContextCallback(Object s)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.AsyncStateMachineBox`1.MoveNext(Thread threadPoolThread)
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.AsyncStateMachineBox`1.MoveNext()
at System.Threading.Tasks.TaskScheduler.TaskSchedulerAwaiter.<>c.<UnsafeOnCompleted>b__6_0(Action s)
at System.Threading.QueueUserWorkItemCallbackDefaultContext`1.Execute()
at System.Threading.ThreadPoolWorkQueue.Dispatch()
at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart()
at System.Threading.Thread.StartCallback()
Sentry.ISentryClient: Information: Exiting the worker with an empty queue.```
The text was updated successfully, but these errors were encountered:
It seems to be related to a known issue that ASP.NET Core intantiates more than one container.
Sentry.ISentryClient: Information: Exiting the worker with an empty queue.```
The first one eventually gets disposed, and so does all IDisposables it resolved. That includes IHub and ISentryClient. The Sentry SDK is initialized again so it should capture events later, but anything that was captured between the first and second container ends up hitting a disposed Hub/Client.
Environment
How do you use Sentry?
Sentry SaaS (sentry.io) or self-hosted/on-premise (which version?)
Sentry on-premise 3.11.0, used for performance and error logging
Which SDK and version?
e.g: JavaScript 5.11.1, .NET 1.2.0
.NET 6.0, Sentry.AspNetCore 3.11.0
Steps to Reproduce
Run multiple instances of asp.net core's web server.
Expected Result
Sentry reports data for all instances
Actual Result
Sentry throws System.OperationCancelledException:
The text was updated successfully, but these errors were encountered: