Skip to content

fix(node): Use normalizeDepth when creating an event from unknown input #5689

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

Merged
merged 3 commits into from
Sep 7, 2022

Conversation

Lms24
Copy link
Member

@Lms24 Lms24 commented Sep 2, 2022

This PR makes use of the normalizeDepth init option when creating events from an unknown input. It potentially fixes #5687 where a user reported that calling Sentry.captureException with a deep custom object, the normalizeDepth isn't respected but the depth defaults to 3.

Note: I'm not sure if this behaviour was intentional or if we have a bug. Opened this quick PR with an idea how to fix it. Since I'm gone for the next weeks, reviewer(s) please feel free to change, close or merge this PR! Was just a quick idea.
If we decide to go with this, we might want to apply the same fix to the Browser SDKs event builder.

@Lms24 Lms24 force-pushed the lms-fix-normalizeToSize-depth branch from 7bba630 to 8ebddd4 Compare September 2, 2022 13:53
@lforst lforst marked this pull request as ready for review September 5, 2022 09:27
@lforst
Copy link
Contributor

lforst commented Sep 5, 2022

@AbhiPrasad @lobsterkatie IMO this change is sound and we can go through with this. Any objections?

@lobsterkatie
Copy link
Member

Nope. Seems good to me! I do think we should do it for browser also.

@lforst lforst merged commit 732c42d into master Sep 7, 2022
@lforst lforst deleted the lms-fix-normalizeToSize-depth branch September 7, 2022 10:33
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

Successfully merging this pull request may close these issues.

Sentry normalizeDepth not working
3 participants