I have one Django project that is running behind Gunicorn(wsgi) and Channels2(asgi) for handling HTTP and WebSocket separately.
Running Gunicorn would raise a RuntimeError:
RuntimeError( "We detected that you are using Django channels 2.0. To get proper " "instrumentation for ASGI requests, the Sentry SDK requires " "Python 3.7+ or the aiocontextvars package from PyPI." )
Either upgrading to py3.7 or Installing aiocontextvars would not solve the problem.
It looks that _patch_channels()
will be called anyway during initialization, and
HAS_REAL_CONTEXTVARS is False because of gevent is installed
Related libraries and versions:
[packages]
Django==2.2.3
channels==2.3.0
aiocontextvars==0.2.2
gevent==1.4.0
gunicorn==19.9.0
[requires]
python_version = "3.6"
I have one Django project that is running behind Gunicorn(wsgi) and Channels2(asgi) for handling HTTP and WebSocket separately.
Running Gunicorn would raise a RuntimeError:
RuntimeError( "We detected that you are using Django channels 2.0. To get proper " "instrumentation for ASGI requests, the Sentry SDK requires " "Python 3.7+ or the aiocontextvars package from PyPI." )Either upgrading to py3.7 or Installing
aiocontextvarswould not solve the problem.It looks that
_patch_channels()sentry-python/sentry_sdk/integrations/django/__init__.py
Line 276 in 5347575
HAS_REAL_CONTEXTVARSis False because of gevent is installedRelated libraries and versions:
[packages]
Django==2.2.3
channels==2.3.0
aiocontextvars==0.2.2
gevent==1.4.0
gunicorn==19.9.0
[requires]
python_version = "3.6"