getsentry / raven-python

Raven is the legacy Python client for Sentry (getsentry.com) — replaced by sentry-python
https://sentry.io
BSD 3-Clause "New" or "Revised" License
1.68k stars 657 forks source link

fix: Dont serialize nan when present in frame local vars #1312

Closed untitaker closed 5 years ago

untitaker commented 5 years ago

We want to use Rust on the server to decode JSON and it's not possible to just hook into there and add support for new constants (essentially new syntax) without forking the JSON library or running some code before deserializing.

The exact values are how frame.vars are coerced on the server anyway so there is no difference in display to the user.

Raven still permits sending NaN as part of other variables. Sentry-sdk (in master) treats it like any unserializable value. Serverside this is converted to None while deserializing.

Not sure if coercing to string would be that great (might create new groups) or if we should rather just crash in the SDK like sentry-sdk does now and drop the event.

untitaker commented 5 years ago

So, every number is a string now. I think this is not necessary for dicts and lists as the trimming behavior is more sophisticated there. We might actually want to port parts of this from raven to the new sdk