-
-
Notifications
You must be signed in to change notification settings - Fork 189
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix events generated in queue worker not sending #228
Conversation
# Conflicts: # src/Sentry/Laravel/EventHandler.php
# Conflicts: # src/Sentry/Laravel/EventHandler.php
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thx 💯 LGTM
{ | ||
$client = Hub::getCurrent()->getClient(); | ||
|
||
if ($client instanceof Client) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should implement close
/flush
in the main SDK, this should make this obsolete.
This code should go directly in there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@HazAT yes, we had extensive discussion about it and the consensus is we made a mistake implementing the async stuff, so this is a workaround until we can fix that in the base SDK 👍 this will be removed at a later time since it won't be needed if fixed in the base SDK.
This is a workaround until we are able to restructure / fix the underlying issue in the client and our inability to wait for all events to be sent (or make sure they are sent immediately instead of waiting for a
wait
call, context getsentry/sentry-php#799).The scope popping was also not happening correctly because the
JobProcessed
event is only fired when a job is successfully handled. Another event is dispatched when an error occurs but the exception is logged after those events fire, thus the scope will already be popped once the exception is recorded, making the scope effectively useless./fixes #222