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

Skip attributes if the value is nan #465

Merged
merged 14 commits into from
Dec 2, 2024
Merged

Skip attributes if the value is nan #465

merged 14 commits into from
Dec 2, 2024

Conversation

nityanandagohain
Copy link
Member

@nityanandagohain nityanandagohain commented Nov 27, 2024

We had an incident where the user sent a nan value for a key and it was stored in the numbers map. when we serialzied the data the json.marshal threw error as it cann't marshan nan values.

In this change I have skipped the attributes which contains nan values.

the other way was to just remove it during the marshal process, but I went with this just to keep the things same even during marshal.

@nityanandagohain nityanandagohain changed the title Fix/debug nan Skip attributes if the value is nan Nov 28, 2024
@nityanandagohain nityanandagohain marked this pull request as ready for review November 28, 2024 09:19
Copy link
Member

@srikanthccv srikanthccv left a comment

Choose a reason for hiding this comment

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

What happens with +Inf/-Inf?

exporter/clickhousetracesexporter/clickhouse_exporter.go Outdated Show resolved Hide resolved
exporter/clickhousetracesexporter/clickhouse_exporter.go Outdated Show resolved Hide resolved
exporter/clickhousetracesexporter/writer.go Outdated Show resolved Hide resolved
@nityanandagohain
Copy link
Member Author

Updated the errors and added check for +- Inf

@nityanandagohain nityanandagohain merged commit cd56602 into main Dec 2, 2024
3 checks passed
@nityanandagohain nityanandagohain deleted the fix/debug-nan branch December 2, 2024 10:55
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.

3 participants