feat(integrations): New SysExitIntegration#3401
Merged
Merged
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 |
Member
Author
|
I still need to write docs for this |
antonpirker
approved these changes
Aug 9, 2024
Contributor
antonpirker
left a comment
There was a problem hiding this comment.
Very cool!
We need to add this to the docs though
Co-authored-by: Anton Pirker <anton.pirker@sentry.io>
Member
Author
|
Docs issue: getsentry/sentry-docs#11043 |
szokeasaurusrex
added a commit
to getsentry/sentry-docs
that referenced
this pull request
Aug 27, 2024
Add documentation for the sys.exit integration, introduced in getsentry/sentry-python#3401. Closes #11043
3 tasks
szokeasaurusrex
added a commit
to getsentry/sentry-docs
that referenced
this pull request
Aug 27, 2024
Add documentation for the sys.exit integration, introduced in getsentry/sentry-python#3401. Closes #11043
Member
Author
|
Gonna go ahead with merging this, the docs PR is in review |
szokeasaurusrex
added a commit
to getsentry/sentry-docs
that referenced
this pull request
Sep 9, 2024
* 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>
glensc
reviewed
Sep 10, 2024
| @staticmethod | ||
| def setup_once(): | ||
| # type: () -> None | ||
| SysExitIntegration._patch_sys_exit() |
There was a problem hiding this comment.
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()
arjennienhuis
pushed a commit
to arjennienhuis/sentry-python
that referenced
this pull request
Sep 30, 2024
* 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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
SysExitIntegrationreportsSystemExitexceptions raised by calls made tosys.exitwith a value indicating unsuccessful program termination – that is, any value other than0orNone. Optionally, by settingcapture_successful_exits=True, theSysExitIntegrationcan also reportSystemExitexceptions resulting fromsys.exitcalls with successful values.You need to manually enable this integration if you wish to use it.
Closes #2636
Docs issue: getsentry/sentry-docs#11043