Open
Description
When the SDK cannot encode an event to JSON to send to Sentry, it'll just log a warning, such as:
[warning] Failed to send Sentry event. Sentry failed to report event: the Sentry SDK could not encode the event to JSON: invalid byte X in ...
I’m concerned that these events don't bubble up to Sentry in any way. They can slip completely under the radar if someone is not looking at warning logs in production.
I’m thinking we should report these events to Sentry, wrapped in an internal Sentry.SDKInternalError
error. We can show users the event that caused the issue (inspected as a string, so no encoding issues) and tell them to possibly open an issue in this repository.
Thoughts from @sl0thentr0py in particular? I’m not sure what other SDKs do in situations such as this.