Greetings fellows,
we recently by accident discovered that we are not getting all exceptions in Sentry.
Current versions
Python 3.6.7
Django 2.1.7
Celery 4.1.1
Sentry SDK 0.7.2
Current behavior
If the exception will have a big context (I do not know the exact limits of it), Sentry server (sentry.io) responds with HTTP code 413.
The code in sentry_sdk.transport.HttpTransport#_send_event is raising ValueError("Unexpected status code") in this case. If you do not set debug=True during the Sentry SDK initialization, you would not know that and you would be completely unaware of having issues in the code.
This issue today took us some time to discover.
Expected behaviour (IMHO)
I believe, Sentry SDK should try to do its best to send exceptions.
In case of a too big payload, it maybe could retry the request without the full payload, but just an exception name with some note "Your context is too big, could not be shown" or something like this.
In the worst case, we should get this kind of events in logs even without debug turned off.
What do you think?
Greetings fellows,
we recently by accident discovered that we are not getting all exceptions in Sentry.
Current versions
Python 3.6.7
Django 2.1.7
Celery 4.1.1
Sentry SDK 0.7.2
Current behavior
If the exception will have a big context (I do not know the exact limits of it), Sentry server (sentry.io) responds with HTTP code 413.
The code in
sentry_sdk.transport.HttpTransport#_send_eventis raisingValueError("Unexpected status code")in this case. If you do not setdebug=Trueduring the Sentry SDK initialization, you would not know that and you would be completely unaware of having issues in the code.This issue today took us some time to discover.
Expected behaviour (IMHO)
I believe, Sentry SDK should try to do its best to send exceptions.
In case of a too big payload, it maybe could retry the request without the full payload, but just an exception name with some note "Your context is too big, could not be shown" or something like this.
In the worst case, we should get this kind of events in logs even without debug turned off.
What do you think?