Open
Description
How do you use Sentry?
Sentry Saas (sentry.io)
Version
2.13.0
Steps to Reproduce
Python 3.10
Django 4.2.20
Gunicorn 23.0.0
sentry_sdk.init(
dsn=os.getenv("SENTRY_BE_DSN"),
integrations=[DjangoIntegration(), RedisIntegration()],
traces_sample_rate=0.0,
send_default_pii=True,
environment=os.getenv("APP_NAME"),
release=os.getenv("COMMIT"),
)
Looks similar to #3724.
Expected Result
Exception is not raised.
Actual Result
Traceback (most recent call last):
File "/app/.venv/python/lib/python3.10/site-packages/gunicorn/workers/gthread.py", line 346, in handle_request
respiter.close()
File "/app/.venv/python/lib/python3.10/site-packages/sentry_sdk/integrations/wsgi.py", line 235, in close
with use_isolation_scope(self._scope):
File "/app/.venv/python/lib/python3.10/contextlib.py", line 142, in __exit__
next(self.gen)
File "/app/.venv/python/lib/python3.10/site-packages/sentry_sdk/scope.py", line 1678, in use_isolation_scope
_current_scope.reset(current_token)
LookupError: <ContextVar name='current_scope' default=None at 0x7f88232e1620>
Metadata
Metadata
Assignees
Type
Projects
Status
No status