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

Align Event Schemas across SDKs for list values #662

Open
AbhiPrasad opened this issue Aug 3, 2022 · 1 comment
Open

Align Event Schemas across SDKs for list values #662

AbhiPrasad opened this issue Aug 3, 2022 · 1 comment

Comments

@AbhiPrasad
Copy link
Member

In getsentry/sentry-python#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, breadcrumbs is a dict with a key values mapping to a list. But JS expects breadcrumbs to just be the list (array) rather than a dict (object). If I set event.breadcrumbs = event.breadcrumbs.values in JS, then everything goes back to working perfectly. However this doesn't mean much since in this case event.breadcrumbs is just {values: []}. I don't know if there are sometimes keys other than values, 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.breadcrumbs
  • event.exception
  • event.threads
@AbhiPrasad AbhiPrasad changed the title Align Event Schemas across SDKs Align Event Schemas across SDKs for list values Aug 3, 2022
@dcramer
Copy link
Member

dcramer commented Aug 3, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants