Sentry not logging chain exception `raise Exception() from e`
See original GitHub issueSentry not logging chain exception raise Exception() from e
for example
class FooFail(Exception):
pass
try:
1/0
except Exception as e:
raise FooFail('a foo exception.') from e
Since e
contain the information use to identify cause of root exception. It is very important to see chain exception detail. The missing of detail in Sentry issue panel.
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Sentry not showing exception in web UI with logger.exception()
The sentry UI only shows the logged message and no stack trace. With regards to Sentry best practices (in python as well):. Do...
Read more >Usage for Logging | Sentry Documentation
Usage. Sentry's SDK hooks into your runtime environment and automatically reports errors, uncaught exceptions, and unhandled rejections as well as other types ...
Read more >Handling exceptions in Python like a pro | Hacker News
Exception chaining (`raise from`) was new to me but after reading the docs it seems to be the default behavior in except/finally blocks,...
Read more >Distributed Logging in Federated Applications, with Sentry
When it comes to distributed applications, Javascript logging gets tricky. ... throw new Error(`Remote ${remote} is not avaliable on window.
Read more >Exception Interface - Sentry Developer Documentation
try: raise Exception except Exception as e: raise ValueError from e ... any exception mechanism attribute, even if the SDK cannot determine the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
If you see a plaintext traceback you will have a bad time for a lot of reasons:
Usually this is caused by code that stringifies the exception using the
traceback
module and then logs it. You can find out which logger that is using thelogger
event tag.Both exceptions should show on the details page.