[exporter/awscloudwatchlogs] Inf/NaN attribute values will cause JSON marshal failure #30332
Labels
closed as inactive
exporter/awscloudwatchlogs
awscloudwatchlogs exporter
exporter/awsemf
awsemf exporter
priority:p3
Lowest
Stale
Reading this section of code made me wonder what would happen there was an attribute with
Double
type andMath.Inf()
value.With slightly modification to your PR I saw that the JSON marshaling would fail.
We have seen this JSON marshaling failure before in the EMF Exporter when a metric is processed with
Inf
orNaN
values. In the EMF Exporter we completely drop the metric.I think this "issue" is outside the scope of the PR but should at least be noted somewhere. At minumum I think this affects the
awsemfexporter
andawscloudwatchlogs
exporter. I think this would also affect any exporter that does JSON marshaling before export. Having to clean a set of attributes for each log seems computationally expensive so we should verify the cost of doing so before moving forward with a very simple fix (checking for and removing all NaN/Inf) values.Originally posted by @bryan-aguilar in #30316 (comment)
The text was updated successfully, but these errors were encountered: