Cannot push user scope using 0.13.2 and Flask
See original GitHub issueHere’s my decorator that I use to set the scope when necessary
def sentry_configure_scope(func):
"""
This decorator will set the user scope for sentry
"""
@wraps(func)
def decorated_function(*args, **kwargs):
if session['token']:
with configure_scope() as scope:
token = session['token']
claims = decode(token, verify=False)
u = {
"id": claims['identity']['client_id'],
"username": "" + claims['identity']['first_name'] + " " + claims['identity']['last_name'],
"email": claims['identity']['email']
}
scope.set_user(u)
return func(*args, **kwargs)
return decorated_function
I’ve checked using the pycharm debugger and it seems that the scope._user
is correctly set with the dict but once on sentry.io, the user scope is nowhere to be found…
Any guess ? (only tested on local, maybe that’s it ?)
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
working outside of application context - Flask - Stack Overflow
This typically means that you attempted to use functionality that needed the current application. To solve this, set up an application context with...
Read more >Flask-Security Documentation
Flask -Security allows you to quickly add common security mechanisms to your Flask application. They include: 1. Session based authentication.
Read more >Deploying Python Flask microservices to AWS using open ...
We will use ECR as our registry. Let's build and push our container image to ECR. 1. First, you will need to create...
Read more >The Application Context — Flask Documentation (2.2.x)
When using the app factory pattern or writing reusable blueprints or extensions there won't be an app instance to import at all. Flask...
Read more >flask-restplus is broken by Werkzeug 1.0.0 · Issue #777 - GitHub
Temporary workaround: use Werkzeug==0.16.1. This solution worked for me as well. for me flask-restplus installed Werkzeug [required: >=0.15, ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Glad to hear that!
@Seluj78 try
scopes are not a thing inside before_send