As of this week we are running our stack using python 3, django 2 and django channels 2. As this is an ASGI application we use a daphne server to handle both HTTP and websocket requests.
So far we are really happy with the overall performance and stability. In sentry, however, some errors appear to show mixed tracebacks from different requests.
As I understand correctly this might be because
synchronous views ought to run within a threadpool executor
My question really is, what is the correct way to aggregate logging to towards sentry in an ASGI application? I found this library by tomchristie, creator of starlette. Does anyone have experience using it in a django context?
specs:
raven==6.9.0
daphne==2.2.2
Django==2.1.1
channels==2.1.3
logging setup:
...
'handlers': {
'sentry': {
'level': sentry_level,
'class': 'raven.contrib.django.handlers.SentryHandler',
},
},
....