-
Notifications
You must be signed in to change notification settings - Fork 462
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a span around Django rest framework authentication #3006
Labels
Comments
@angusholder makes sense, feel free to PR and add a simliar patch here sentry-python/sentry_sdk/integrations/django/__init__.py Lines 301 to 317 in 411c9f3
if you want it quicker, otherwise I'll put it on our backlog |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Problem Statement
In Sentry Performance, when I look at the queries list in a performance event of an API view, the
view.render
event always begins with a few of the same queries, for looking up the auth token, and are rarely relevant. It would be better if those auth queries were in a separate span, to reduce visual noise.Solution Brainstorm
I currently subclass the authentication class and add a span myself, like this:
The disadvantage of this is you can use multiple authentications, and each would need modifying. A better place for the span is probably
rest_framework.request.Request._authenticate
, which loops over all configured authentications.The text was updated successfully, but these errors were encountered: