-
Notifications
You must be signed in to change notification settings - Fork 515
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
feat(integrations): New SysExitIntegration
#3401
Conversation
The `SysExitIntegration` reports `SystemExit` exceptions raised by calls made to `sys.exit` with a value indicating unsuccessful program termination – that is, any value other than `0` or `None`. Optionally, by setting `capture_successful_exits=True`, the `SysExitIntegration` can also report `SystemExit` exceptions resulting from `sys.exit` calls with successful values. You need to manually enable this integration if you wish to use it. Closes #2636
8600ea2
to
a91d342
Compare
❌ 4 Tests Failed:
View the top 3 failed tests by shortest run time
To view individual test run time comparison to the main branch, go to the Test Analytics Dashboard |
I still need to write docs for this |
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.
Very cool!
We need to add this to the docs though
Co-authored-by: Anton Pirker <anton.pirker@sentry.io>
Docs issue: getsentry/sentry-docs#11043 |
Add documentation for the sys.exit integration, introduced in getsentry/sentry-python#3401. Closes #11043
Add documentation for the sys.exit integration, introduced in getsentry/sentry-python#3401. Closes #11043
Gonna go ahead with merging this, the docs PR is in review |
* docs(python): Document sys.exit integration Add documentation for the sys.exit integration, introduced in getsentry/sentry-python#3401. Closes #11043 * Apply suggestions from code review Co-authored-by: vivianyentran <20403606+vivianyentran@users.noreply.github.com> --------- Co-authored-by: vivianyentran <20403606+vivianyentran@users.noreply.github.com>
@staticmethod | ||
def setup_once(): | ||
# type: () -> None | ||
SysExitIntegration._patch_sys_exit() |
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.
you could use classmethod instead. then you would not need to know name of current class.
@classmethod
def setup_once(cls):
# type: () -> None
cls._patch_sys_exit()
* feat(integrations): New `SysExitIntegration` The `SysExitIntegration` reports `SystemExit` exceptions raised by calls made to `sys.exit` with a value indicating unsuccessful program termination – that is, any value other than `0` or `None`. Optionally, by setting `capture_successful_exits=True`, the `SysExitIntegration` can also report `SystemExit` exceptions resulting from `sys.exit` calls with successful values. You need to manually enable this integration if you wish to use it. Closes getsentry#2636 * Update sentry_sdk/integrations/sys_exit.py Co-authored-by: Anton Pirker <anton.pirker@sentry.io> --------- Co-authored-by: Anton Pirker <anton.pirker@sentry.io>
The
SysExitIntegration
reportsSystemExit
exceptions raised by calls made tosys.exit
with a value indicating unsuccessful program termination – that is, any value other than0
orNone
. Optionally, by settingcapture_successful_exits=True
, theSysExitIntegration
can also reportSystemExit
exceptions resulting fromsys.exit
calls with successful values.You need to manually enable this integration if you wish to use it.
Closes #2636
Docs issue: getsentry/sentry-docs#11043