Align Event Schemas across SDKs for list values
In https://github.com/getsentry/sentry-python/discussions/1537 it was highlighted that there are inconsistencies between the events generated in the JS SDK and in the Python SDK. Specifically:
The problem is that in the Python event,
breadcrumbsis adictwith a keyvaluesmapping to a list. But JS expectsbreadcrumbsto just be the list (array) rather than a dict (object). If I setevent.breadcrumbs = event.breadcrumbs.valuesin JS, then everything goes back to working perfectly. However this doesn't mean much since in this caseevent.breadcrumbsis just{values: []}. I don't know if there are sometimes keys other thanvalues, or if the lists themselves are also sometimes incompatible between the SDKs.
This applies to all event items that are a flat list vs. a list under values, which for now are:
event.breadcrumbsevent.exceptionevent.threads
FYI this exists this way for compatibility reasons. The ideal world kept it as a flat list, but because our interfaces required key/value, we would accept that data type and then map it to the values attribute. So that means both are/were valid. I dont think it solves the UX of if you need to filter/augment it on the client though.