scout_apm_python
scout_apm_python copied to clipboard
ScoutApm should never crash user code
As a end user, I never expect Scout to crash my code if an internal exception occurs, so I would love a global try/except Exception around Scout methods.
What's your take on this ?
I agree we shouldn't crash users' code. We work hard to not do that. We always tread a fine line though between being too defensive (which makes the integration hard to unit test, hard to verify from a user's perspective, and hard to know every feature works "in the wild") and having the opportunity.
We do test as much as possible with various setups. I'm sorry you encountered the issue in #417, I will work to make sure every URL based feature is better tested with unicode on Python 2.
I'll also look into putting the more "incidental" data gathering under more protection - for example the path isn't vital APM data so we can probably wrap a big try/except on that quite easily.
Thanks,
Adam
I'm sure it's not easy to find a balance, in fact I guess it's almost impossible, so I got thinking about a "debug" mode which would reraise the errors that would be all caught by default ?