jrobichaud / django-structlog

Structured Logging for Django
https://django-structlog.readthedocs.io/en/latest/
MIT License
434 stars 34 forks source link

Support `got_request_exception` signal and rely on it rather than on `process_exception` code #658

Open sshishov opened 6 days ago

sshishov commented 6 days ago

Hi dear maintainer

We are using drf_standardized_errors and this package is handling unhandled exception without propagating them: https://github.com/ghazi-git/drf-standardized-errors/issues/91

I would like to ask if it is possible to add the support for such scenario?

There can be 2 scenarios:

Could we support both these scenarios as relying on signal which is used by Sentry as well is much more reliable than on middleware code which can be not called if exception is handled manually.

Best regards, Sergei

jrobichaud commented 6 days ago

Did you try to change the order of the middlewares in your settings.py?

In which order are you using them?