I have written an option for Excepthook integrations.
The Sentry error capture and monitor library has recently changed its official library. I wanted to update the old library. I found a lack of testing.
- What feature(s) did you add?
Always_run
Sentry does not catch errors in repl. They have a filter for that. If you when error with the code from an active terminal or debug screen; does not catch errors. Sometimes I need this feature.
I've made this query dependent on the user's request.
Example Code
$ python
> from sentry_sdk import init
> from sentry_sdk.integrations.excepthook import ExcepthookIntegration
>
> init("http://foobar@localhost/123",
> integrations=[ExcepthookIntegration(always_run=True)]
> )
its simple. :)
- How did you implement it/them?
ExcepthookIntegration class was not getting an initial value. I added the initial value and set the default value to False. I changed the query that controls repl activity, and I've canceled it if always_run is set.
I also had to write one test to support the repo. It was fun. :)
I also opened a pr in the document. Not officially approved, but accepted. The next merger is said to be taken.
Doc-PR
GitHub Account
tolgahanuzun