Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The cause of #371 is that logging from within the Sentry.LoggerBackend can deadlock Logger itself. When Logger receives a bunch of messages and can't process them fast enough, it switches into synchronous mode (default is queue length of 20). This means when Sentry.LoggerBackend tries to log while Logger is in synchronous mode, it will deadlock because Sentry.LoggerBackend is waiting for Logger to return a response while Logger is waiting for Sentry.LoggerBackend to process messages.
I started a little bit of a refactor in how Client handles errors to separate the Logger pieces from the Client to potentially make changes going forward, but the fix is relatively straightforward for now in that if the event_source on the event is the LoggerBackend, we don't log.
I'm not expecting many users to see this, especially in production, but this is dangerous behavior that should not be possible 🙂
closes #371