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

Add logic to remove null key-value pairs in trace json #659

Merged
merged 2 commits into from
Sep 22, 2023

Conversation

mchadalavada
Copy link
Contributor

@mchadalavada mchadalavada commented Sep 22, 2023

The Json serializer removes keys with null values in the parent attributes only. If the one of the attributes has children and if the child has a key with null value, that child key is not removed. This resulted in the trace json having null values and the visualizer failed to show the trace.

The current fix recursively traverses through the event payload and removes the keys that have null values

Copy link
Member

@ankushdesai ankushdesai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are we removing keys with null values instead of replacing them with a string null

@ankushdesai ankushdesai merged commit 39fb385 into p-org:master Sep 22, 2023
7 checks passed
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.

2 participants