samples-server
samples-server copied to clipboard
Fix NR's count metric by using float rather than int
What was changed
- Submit float value to NewRelic's
countmetrics.
https://docs.newrelic.com/docs/data-apis/understand-data/metric-data/metric-data-type/
- Remove the unwanted
serverclose callback.
Why?
Prometheus's rate function calculates the per-second average rate of increase of the time series in the range vector, which is returned as a decimal number in json. For example, with low RPS, e.g. 8 requests in 1 minute, the rate query returns 8/60 ~= 0.133. Therefore, we should submit the number to NewRelic as float rather than int.
Checklist
-
Closes N/A
-
How was this tested: Manual
-
Any docs updates needed? No