Skip to content
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 SDK erroring every request #3539

Open
JoshFerge opened this issue Sep 13, 2024 · 1 comment
Open

Sentry SDK erroring every request #3539

JoshFerge opened this issue Sep 13, 2024 · 1 comment
Assignees
Labels
Integration: Django Type: Bug Something isn't working

Comments

@JoshFerge
Copy link
Member

How do you use Sentry?

Sentry Saas (sentry.io)

Version

2.12.0

Steps to Reproduce

The sentry SDK is erroring what seems like nearly every request on Sentry's internal hybrid cloud RPC pods. It started on Aug 14 ~11 AM PST and continues to today. This is causing 10s millions of logs to be sent, and has possibly large effects on the latency of hybrid cloud request calls. I don't see any commits lining up when this started occuring, but seems like a somewhat simple fix SDK side, to at least not error.

https://console.cloud.google.com/logs/query;query=resource.type%3D%22k8s_container%22%0Alabels.name%3D~%22sentry%22%0A-labels.name%3D%22sentry.access.api%22%0AjsonPayload.name%3D%22sentry_sdk.errors%22%0Alabels.name%3D%22sentry_sdk.errors%22%0A%22WSGIRequest%22;summaryFields=:true:32:beginning;lfeCustomFields=labels%252F%2522k8s-pod%252Fservice%2522;cursorTimestamp=2024-08-14T18:06:32.262136870Z;aroundTime=2024-08-14T17:50:16.689Z;duration=PT1H?project=internal-sentry&rapt=AEjHL4OyxsqTpJDNXDvnY7TfRndLT31Fr3F93ohLYI6x7gCF5X8q2Kk4F32STWs6HqL2snyUk4ygA_8FXDGBceGeTGRoX0JOBgBan2p8yAJUC0q6YUwzj8A

Traceback (most recent call last):
File "/.venv/lib/python3.11/site-packages/sentry_sdk/integrations/django/init.py", line 572, in parsed_body
return self.request.data
^^^^^^^^^^^^^^^^^
AttributeError: 'WSGIRequest' object has no attribute 'data'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/.venv/lib/python3.11/site-packages/sentry_sdk/integrations/django/init.py", line 503, in wsgi_request_event_processor
DjangoRequestExtractor(request).extract_into_event(event)
File "/.venv/lib/python3.11/site-packages/sentry_sdk/integrations/_wsgi_common.py", line 97, in extract_into_event
parsed_body = self.parsed_body()
^^^^^^^^^^^^^^^^^^
File "/.venv/lib/python3.11/site-packages/sentry_sdk/integrations/django/init.py", line 574, in parsed_body
return RequestExtractor.parsed_body(self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/.venv/lib/python3.11/site-packages/sentry_sdk/integrations/_wsgi_common.py", line 143, in parsed_body
return self.json()
^^^^^^^^^^^
File "/.venv/lib/python3.11/site-packages/sentry_sdk/integrations/_wsgi_common.py", line 155, in json
raw_data = self.raw_data()
^^^^^^^^^^^^^^^
File "/.venv/lib/python3.11/site-packages/sentry_sdk/integrations/django/init.py", line 555, in raw_data
return self.request.body
^^^^^^^^^^^^^^^^^
File "/.venv/lib/python3.11/site-packages/django/http/request.py", line 328, in body
raise RawPostDataException(
django.http.request.RawPostDataException: You cannot access body after reading from request's data stream

Expected Result

sentry SDK should not error in control silos

Actual Result

these errors

@sentrivana
Copy link
Contributor

Probably related: #3045

@sentrivana sentrivana self-assigned this Sep 19, 2024
@sentrivana sentrivana added Type: Bug Something isn't working Integration: Django labels Sep 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Integration: Django Type: Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants