Skip to content

feat: Remove normalization of contexts #2649

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

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

- "You miss 100 percent of the chances you don't take. — Wayne Gretzky" — Michael Scott
- [react] feat: Add @sentry/react package (#2631)
- [core] feat: Remove normalization of contexts (#2649)

## 5.16.1

Expand Down
4 changes: 0 additions & 4 deletions packages/core/src/baseclient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,6 @@ export abstract class BaseClient<B extends Backend, O extends Options> implement
* Normalized keys:
* - `breadcrumbs.data`
* - `user`
* - `contexts`
* - `extra`
* @param event Event
* @returns Normalized event
Expand All @@ -313,9 +312,6 @@ export abstract class BaseClient<B extends Backend, O extends Options> implement
...(event.user && {
user: normalize(event.user, depth),
}),
...(event.contexts && {
contexts: normalize(event.contexts, depth),
}),
...(event.extra && {
extra: normalize(event.extra, depth),
}),
Expand Down
4 changes: 2 additions & 2 deletions packages/core/test/lib/base.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,7 @@ describe('BaseClient', () => {
});
expect(TestBackend.instance!.event!).toEqual({
breadcrumbs: [normalizedBreadcrumb, normalizedBreadcrumb, normalizedBreadcrumb],
contexts: normalizedObject,
contexts: fourLevelsObject,
event_id: '42',
extra: normalizedObject,
timestamp: 2020,
Expand Down Expand Up @@ -512,7 +512,7 @@ describe('BaseClient', () => {
});
expect(TestBackend.instance!.event!).toEqual({
breadcrumbs: [normalizedBreadcrumb, normalizedBreadcrumb, normalizedBreadcrumb],
contexts: normalizedObject,
contexts: fourLevelsObject,
event_id: '42',
extra: normalizedObject,
timestamp: 2020,
Expand Down