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 incorrect timeout warnings in AWS Lambda and GCP integrations #854
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -116,6 +116,13 @@ def sentry_handler(event, context, *args, **kwargs): | |
) | ||
hub.capture_event(event, hint=hint) | ||
reraise(*exc_info) | ||
finally: | ||
if ( | ||
integration.timeout_warning | ||
and configured_time > TIMEOUT_WARNING_BUFFER | ||
): | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I see that It would be clearer to always define if timeout_thread is not None:
timeout_thread.stop()
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Made this change in latest commit. |
||
timeout_thread.stop_thread = True | ||
timeout_thread.join() | ||
rhcarvalho marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
return sentry_handler # type: ignore | ||
|
||
|
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.
@untitaker In this "finally" block, the code to stop the thread basically works in case of :-
But, it doesn't stop the thread in case of timeout, which is an expected behavior.
By "stop the thread" I mean explicitly stopping a thread by sending a stop signal.