You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
LookupError <ContextVar name='current_scope' default=None at 0x7f88232e1620> #4410
Interestingly enough we use the same gunicorn setup, i.e. --threads arg and therefore gthread workers, with another Django app and we don't see this error there. However, the other app uses sentry-sdk = "==1.14.*".
Hey @sentrivana, not yet, unfortunately. We have a deadline till the end of this moth with a certain migration, so that has a higher priority. But the plan is to bump to latest sentry-sdk version and use the suggested config.
Reproduction steps are very unlikely to be provided since we don't really understand what triggers this behavior.
Understood @DusanMadar, please update us when there's news. In the meantime I'm thinking that even if we can't repro this, we can at least mitigate by not letting it bubble all the way up. Will look into that.
Wrapped the errors so that they don't surface in #4481. There will probably be a release with this next week.
It'd still be worthwhile to fix the underlying problem, so if there's any follow-ups, please let us know even if the issue is closed with the PR being merged.
Activity
antonpirker commentedon May 22, 2025
Hey @DusanMadar, thanks for writing in.
Can you try to disable the gthread workers in Gunicorn to see if the exception is also raised with the default workers?
DusanMadar commentedon May 23, 2025
Hey @antonpirker, thanks for a quick response.
We'll discuss your proposal with the team. 👍
Interestingly enough we use the same gunicorn setup, i.e.
--threadsarg and therefore gthread workers, with another Django app and we don't see this error there. However, the other app usessentry-sdk = "==1.14.*".antonpirker commentedon May 26, 2025
Hey! One more thing @DusanMadar do you use the
propagate_huborpropagate_scopeparameter in theThreadingIntegration?antonpirker commentedon May 26, 2025
Oh, @DusanMadar and can you try to use Sentry SDK
2.26.1or preferably the latest version, because we changed something in ourThreadingIntegration. (See https://github.com/getsentry/sentry-python/pull/4281/files)20 remaining items
sentrivana commentedon Jun 16, 2025
Hey, is there any update regarding trying out some of the things suggested here? Or possibly a repro? If yes please let us know.
DusanMadar commentedon Jun 16, 2025
Hey @sentrivana, not yet, unfortunately. We have a deadline till the end of this moth with a certain migration, so that has a higher priority. But the plan is to bump to latest sentry-sdk version and use the suggested config.
Reproduction steps are very unlikely to be provided since we don't really understand what triggers this behavior.
sentrivana commentedon Jun 17, 2025
Understood @DusanMadar, please update us when there's news. In the meantime I'm thinking that even if we can't repro this, we can at least mitigate by not letting it bubble all the way up. Will look into that.
fix(scope): Handle token reset `LookupError`s gracefully (#4481)
sentrivana commentedon Jun 17, 2025
Wrapped the errors so that they don't surface in #4481. There will probably be a release with this next week.
It'd still be worthwhile to fix the underlying problem, so if there's any follow-ups, please let us know even if the issue is closed with the PR being merged.
DusanMadar commentedon Jul 14, 2025
FYI we've deployed latest SDK version and used
integrations=[ThreadingIntegration(propagate_scope=False), ...],config as suggested above. 🤞