samples-server icon indicating copy to clipboard operation
samples-server copied to clipboard

Fix NR's count metric by using float rather than int

Open taonic opened this issue 1 year ago • 0 comments

What was changed

  1. Submit float value to NewRelic's count metrics.

https://docs.newrelic.com/docs/data-apis/understand-data/metric-data/metric-data-type/ image

  1. Remove the unwanted server close 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

  1. Closes N/A

  2. How was this tested: Manual

  3. Any docs updates needed? No

taonic avatar Nov 04 '24 07:11 taonic