-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
feat: Remove normalization of contexts #2649
Conversation
All of the context types documented in [1] are flat objects. The more recent addition contexts.trace is the only context type that may have nested objects under contexts.trace.data. That value holds the data for the Transaction Span and matches spans[].data for invidual Spans. Removing normalization is one solution to the inconsistency in which data in Transactions is heavily limited, while data in Span is ignored by normalization. This is the simplest to implement fix to #2646, thus what we implement here to evaluate. We expect that no other key under contexts will be affected negatively by this change. [1]: https://develop.sentry.dev/sdk/event-payloads/contexts/ Fixes #2646
Talking to @bruno-garcia about a different subject, I learned that historically In that case, if this possibility is used in the wild in JS, we could have undesirable side effects. I'd like to think this through in the light of the new learning.
sentry-javascript/packages/utils/src/object.ts Lines 302 to 321 in fc53353
And alternative I'd like to consider is to do normalize all of |
The documentation for |
Given my last two comments, I'm closing this in favor of #2655. |
All of the context types documented in 1 are flat objects.
The more recent addition contexts.trace is the only context type that
may have nested objects under contexts.trace.data. That value holds the
data for the Transaction Span and matches spans[].data for invidual
Spans.
Removing normalization is one solution to the inconsistency in which
data in Transactions is heavily limited, while data in Span is ignored
by normalization.
This is the simplest to implement fix to #2646, thus what we implement
here to evaluate. We expect that no other key under contexts will be
affected negatively by this change.
Fixes #2646