diff options
author | Ivan Topolnak <itopolnak@despegar.com> | 2014-03-12 16:17:13 -0300 |
---|---|---|
committer | Ivan Topolnak <itopolnak@despegar.com> | 2014-03-12 16:17:13 -0300 |
commit | 28cc99bbc345cf9f8f5afb8272ce72da630771de (patch) | |
tree | b87f5acb726d2fb85fe772e67a1ea7f776d1a448 /kamon-newrelic/src/main | |
parent | b6af84ab6b60b4ca6c0389c8c3622db3d3c27915 (diff) | |
download | Kamon-28cc99bbc345cf9f8f5afb8272ce72da630771de.tar.gz Kamon-28cc99bbc345cf9f8f5afb8272ce72da630771de.tar.bz2 Kamon-28cc99bbc345cf9f8f5afb8272ce72da630771de.zip |
fix transformation between metric snapshots and newrelic metrics
Diffstat (limited to 'kamon-newrelic/src/main')
-rw-r--r-- | kamon-newrelic/src/main/scala/kamon/newrelic/package.scala | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/kamon-newrelic/src/main/scala/kamon/newrelic/package.scala b/kamon-newrelic/src/main/scala/kamon/newrelic/package.scala index 06059c49..f6e377c7 100644 --- a/kamon-newrelic/src/main/scala/kamon/newrelic/package.scala +++ b/kamon-newrelic/src/main/scala/kamon/newrelic/package.scala @@ -27,12 +27,10 @@ package object newrelic { val measurementLevels = snapshot.measurements.iterator while (measurementLevels.hasNext) { val level = measurementLevels.next() - - // NewRelic metrics need to be scaled to seconds. val scaledValue = Scale.convert(snapshot.scale, scale, level.value) - total += scaledValue - sumOfSquares += scaledValue * scaledValue + total += scaledValue * level.count + sumOfSquares += (scaledValue * scaledValue) * level.count } val scaledMin = Scale.convert(snapshot.scale, scale, snapshot.min) |