Replies: 4 comments 5 replies
-
hi @TheBlusky sorry for the late reply here I have not heard this come up before and not sure that the SDK can manage this out of the box. Looking around it does seem this has come up for others though. We don't officially support the libraries or methods below, but it may be helpful. Maybe a feature request if more users are interested though! Thanks for writing in. https://blog.theodo.com/2022/02/logging-uwsgi-alarms-errors-sentry/ |
Beta Was this translation helpful? Give feedback.
-
There is a (kind of) related issue for Gunicorn: #1447 |
Beta Was this translation helpful? Give feedback.
-
uWSGI can now gracefully kill before Harakiri: https://uwsgi-docs.readthedocs.io/en/latest/Changelog-2.0.22.html |
Beta Was this translation helpful? Give feedback.
-
I was able to create a Django middleware able to catch Harakiri, and send transaction to sentry before being killed using new gracefull killing feature :
Adding signal handle in the app config:
And adding the following in uWSGI config :
It might need further testing, but imho this is a good way to do it. |
Beta Was this translation helpful? Give feedback.
-
I am using Sentry on a Django application served by uWSGI with the follwoing configuration:
That means that if a request last more than 20s, uWSGI will kill the worker.
As the worker is killed, Sentry (configured for Django) is unable to send any data about the request.
I saw some options to retrieve Stacktrace (such as
harakiri-verbose
,py-tracebacker
,uwsgi.after_req_hook
). However, nothing (at least recent) regarding implementing is with Sentry.Is it possible for Sentry to catch the Harakiri signal, and send an Exception or a Message before being killed ?
Beta Was this translation helpful? Give feedback.
All reactions