-
Notifications
You must be signed in to change notification settings - Fork 505
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
Sentry randomly crash application #3103
Comments
Hey @mihalikv, thanks for writing in. To clarify, this From the SDK point of view our only interaction with Could you post the full Python stacktrace for the error from your app's logs? Do you use any additional auth middleware or any middleware that does something |
Hi @sentrivana , yes you are right Full stack trace is(I am not sure, how can I provide more details):
Middleware definition is following:
It's probablly not very helpful, but I can say that in our custom middlewares we are also just accesing user_doc attribute and it's not replaced. Another notable think is that we are using DRF and DRF process normal request to own custom request and even user is something special code here. It was our first point of interest while trying to fix it. We even try to monkeypatch it in this way:
but result was the same. |
Ok, thanks for the information @mihalikv, we will continue investigating |
Hey, this error might be the same as #3459. We are planning to release a fix for that issue this week; once the release is out, could you try it out and let us know if the problem is fixed? |
The release should be out today (2.18.0) -- please try and let us know! |
How do you use Sentry?
Self-hosted/on-premise
Version
2.2.0
Steps to Reproduce
requirements.txt
settings.py:
We have Django application with following middleware, that I suspect is a problem:
Then anywhere in the code when I access
request.user.my_custom_attribute
, I get the following exceptionMy first thought was that problem is in my application code so I put logging message to every line to be able to debug "where my_custom_attrbibute goes". Result from logging was that attribute magically disappear on different places.
Error occured totally random -> with more users -> more request -> more random occurences.
When I disabled sentry, app works as expected.
My tought is that sentry somehow patch/copy User object and custom attribute is not included.
I also tried to do minimal setup but in minimal setup application it worked as expected.
Expected Result
Working application code.
I realize that it is not the best idea to set attributes on user but I still think that sentry should not break application.
Actual Result
The text was updated successfully, but these errors were encountered: