getsentry / raven-python

Raven is the legacy Python client for Sentry (getsentry.com) — replaced by sentry-python
https://sentry.io
BSD 3-Clause "New" or "Revised" License
1.68k stars 657 forks source link

Sentry Integration w/ Django Channels #1125

Open DeadSuperHero opened 6 years ago

DeadSuperHero commented 6 years ago

Opening this ticket at the request of @ashwoods ; below is a forwarded message worth investigating in this SDK.

I have a question about Sentry integration with Django, because my app is built with Django channels which allows Django app to handle Websockets.

I have followed your Django integration guide here https://docs.sentry.io/clients/python/integrations/django/

My Django app is built with Django Channels therefore it is not a standard WSGI app :

Do you have any guidelines to integrate Sentry with this set up ? (for example, how to monitor exceptions raised by the asgi interface server ?)

ashwoods commented 6 years ago

Currently, the easiest way to have sentry report messages from consumers is to wrap them with the client.capture_exceptions decorator as in this gist example. Will be updating the django client to enable tags, having complete interfaces will be a bit more tricky.

ChillarAnand commented 6 years ago

Any updates on the issue?

I am using separate servers for asgi and wsgi. All uncaught exceptions of wsgi server are tracked by sentry and it is not able to track asgi server errors.

beaugunderson commented 6 years ago

daphne no longer uses a separate worker process as of 2.0 (which may change how this issue is tackled)

tomchristie commented 5 years ago

There's an ASGI integration available now: https://github.com/encode/sentry-asgi