NaN gauge values not always filtered out
See original GitHub issue#1116 intended to fix the issue of sending NaN
values to Dynatrace, which is not valid JSON and results in a failure. In trying to use the DynatraceMeterRegistry, I get a failure like the following:
2019-03-29 16:08:14.272 ERROR 61557 --- [trics-publisher] i.m.dynatrace.DynatraceMeterRegistry : failed to send metrics to dynatrace: {"error":{"code":400,"message":"Could not map JSON at 'series[22].dataPoints' near line 1 column 2524"}}
Debugging and looking at the request payload, I can see that NaN
is trying to be sent in a dataPoint like:
{
"timeseriesId": "custom:system.cpu.usage",
"dataPoints": [
[
1553842062787,NaN
]
]
}
Looking at the code, it seems the issue is that some gauges can return a finite value one moment and NaN
the next.
My theory is that on line 149 ms.getValue()
is returning a finite number and on line 150 ms.getValue()
is subsequently returning NaN
.
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
Why do reading Micrometer measurement returns NaN ...
This is due to Micrometer using 'weak references' in gauges. Since the gauge doesn't hold a strong reference to the object, when the...
Read more >Micrometer Metrics - Quarkus
Gauges measure a value that can increase or decrease over time, like the speedometer on a car ... entirely or uses NaN (not...
Read more >Micrometer Application Monitoring
Micrometer includes a SimpleMeterRegistry that holds the latest value of each meter in memory and does not export the data anywhere. If you...
Read more >Filter out NaN values in column - Microsoft Power BI Community
Solved: Hi All, I have a column called "Value" in my PBI file, which is of Decimal Number type by default also containing...
Read more >What's new in Grafana v9.0
Prometheus queries are not the easiest to write or understand. ... Starting with grafana 9.0.0, we will always keep NaN values unchanged for...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@izeye feel free to send a pull request. I’ve got plenty of other things to work on 😃
I agree. I mean that in addition to this we may want to look into the unexpected behavior more since it could affect other registries.