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

[exporter/awsemf] Fails to translate inf metrics #29336

Closed
bryan-aguilar opened this issue Nov 17, 2023 · 0 comments · Fixed by #29714
Closed

[exporter/awsemf] Fails to translate inf metrics #29336

bryan-aguilar opened this issue Nov 17, 2023 · 0 comments · Fixed by #29714
Labels
bug Something isn't working exporter/awsemf awsemf exporter priority:p2 Medium

Comments

@bryan-aguilar
Copy link
Contributor

bryan-aguilar commented Nov 17, 2023

Component(s)

exporter/awsemf

What happened?

Description

awsemfexporter will throw an error if any metric contains inf values. This is due to the json parsing failing. Logs in the collector will look like this
2023-11-17T00:09:58.134Z warn batchprocessor@v0.88.0/batch_processor.go:258 Sender failed {"kind": "processor", "name": "batch/metrics", "pipeline": "metrics/cloudwatch", "error": "json: unsupported value: +Inf"}

This will cause all metrics in that batch to be dropped. These errors are common when using a prometheus receiver -> aws emf exporter as inf values are common among prometheus metrics. This is similar to #26267. For the time being I believe this should be handled similar to #26267 where all metrics containing inf values are dropped.

Collector version

v0.88.0

Log output

2023-11-17T00:09:58.134Z    warn    batchprocessor@v0.88.0/batch_processor.go:258    Sender failed    {"kind": "processor", "name": "batch/metrics", "pipeline": "metrics/cloudwatch", "error": "json: unsupported value: +Inf"}
@bryan-aguilar bryan-aguilar added bug Something isn't working needs triage New item requiring triage exporter/awsemf awsemf exporter priority:p2 Medium and removed needs triage New item requiring triage labels Nov 17, 2023
codeboten pushed a commit that referenced this issue Dec 21, 2023
Description: Metrics with Inf values for float types would cause the EMF
Exporter to error out during JSON Marshaling. This PR introduces a
change to drop metric values that contain Inf.

Link to tracking Issue: Fixes
#29336

Testing: Added unit tests at several different points with varying
levels of specificity. Unit tests are quite verbose in this example but
I have followed the format of existing tests while doing very little
refactoring.

Documentation: Update README

---------

Co-authored-by: bryan-aguilar <46550959+bryan-aguilar@users.noreply.github.com>
nslaughter pushed a commit to nslaughter/opentelemetry-collector-contrib that referenced this issue Dec 27, 2023
Description: Metrics with Inf values for float types would cause the EMF
Exporter to error out during JSON Marshaling. This PR introduces a
change to drop metric values that contain Inf.

Link to tracking Issue: Fixes
open-telemetry#29336

Testing: Added unit tests at several different points with varying
levels of specificity. Unit tests are quite verbose in this example but
I have followed the format of existing tests while doing very little
refactoring.

Documentation: Update README

---------

Co-authored-by: bryan-aguilar <46550959+bryan-aguilar@users.noreply.github.com>
nslaughter pushed a commit to nslaughter/opentelemetry-collector-contrib that referenced this issue Dec 27, 2023
Description: Metrics with Inf values for float types would cause the EMF
Exporter to error out during JSON Marshaling. This PR introduces a
change to drop metric values that contain Inf.

Link to tracking Issue: Fixes
open-telemetry#29336

Testing: Added unit tests at several different points with varying
levels of specificity. Unit tests are quite verbose in this example but
I have followed the format of existing tests while doing very little
refactoring.

Documentation: Update README

---------

Co-authored-by: bryan-aguilar <46550959+bryan-aguilar@users.noreply.github.com>
cparkins pushed a commit to AmadeusITGroup/opentelemetry-collector-contrib that referenced this issue Jan 10, 2024
Description: Metrics with Inf values for float types would cause the EMF
Exporter to error out during JSON Marshaling. This PR introduces a
change to drop metric values that contain Inf.

Link to tracking Issue: Fixes
open-telemetry#29336

Testing: Added unit tests at several different points with varying
levels of specificity. Unit tests are quite verbose in this example but
I have followed the format of existing tests while doing very little
refactoring.

Documentation: Update README

---------

Co-authored-by: bryan-aguilar <46550959+bryan-aguilar@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working exporter/awsemf awsemf exporter priority:p2 Medium
Projects
None yet
1 participant