sentry-python: Adding user context for RQ doesn't seem to work when having multiple integrations
I assume that it should be possible to define multiple integrations like so?
sentry_sdk.init(
dsn='...',
environment='...',
integrations=[
FlaskIntegration(), RqIntegration()
]
)
This do work when exceptions occur in RQ, but none of the data that we set through configure_scope() like this are sent:
with configure_scope() as scope:
scope.user = {'email': 'stian@e5r.no'}
We use gevent and Flask-RQ. I debugged the scope inside the RQ process before the exception occurr and the scope has _name = 'flask'…
The user context is sent if I don’t specify multiple integrations during setup. The code is like this then, but this can’t be the way it should be?
sentry_sdk.init(
dsn='...',
environment='...',
integrations=[
FlaskIntegration() if 'rq' not in sys.argv else RqIntegration()
]
)
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 18 (9 by maintainers)
@untitaker I’ll make a pull request instead. It might be easier for everyone that I use a fork and try to debug to find the issue.
I think the issue might have something to do with how “shared” scope works between the different integrations. Hopefully I will find out by the end of this week. I’ll let you know of any updates.