diff options
Diffstat (limited to 'kamon-core/src/main/scala/kamon/metrics')
-rw-r--r-- | kamon-core/src/main/scala/kamon/metrics/ActorMetrics.scala | 4 | ||||
-rw-r--r-- | kamon-core/src/main/scala/kamon/metrics/instruments/MinMaxCounter.scala | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/kamon-core/src/main/scala/kamon/metrics/ActorMetrics.scala b/kamon-core/src/main/scala/kamon/metrics/ActorMetrics.scala index 44dd84b0..9e19dced 100644 --- a/kamon-core/src/main/scala/kamon/metrics/ActorMetrics.scala +++ b/kamon-core/src/main/scala/kamon/metrics/ActorMetrics.scala @@ -17,7 +17,7 @@ package kamon.metrics import com.typesafe.config.Config -import kamon.metrics.instruments.{ CounterRecorder, ContinuousHdrRecorder } +import kamon.metrics.instruments.CounterRecorder import org.HdrHistogram.HdrRecorder case class ActorMetrics(name: String) extends MetricGroupIdentity { @@ -62,7 +62,7 @@ object ActorMetrics extends MetricGroupCategory { new ActorMetricRecorder( HdrRecorder(processingTimeConfig.highestTrackableValue, processingTimeConfig.significantValueDigits, Scale.Nano), - ContinuousHdrRecorder(mailboxSizeConfig.highestTrackableValue, mailboxSizeConfig.significantValueDigits, Scale.Unit), + HdrRecorder(mailboxSizeConfig.highestTrackableValue, mailboxSizeConfig.significantValueDigits, Scale.Unit), HdrRecorder(timeInMailboxConfig.highestTrackableValue, timeInMailboxConfig.significantValueDigits, Scale.Nano), CounterRecorder()) } diff --git a/kamon-core/src/main/scala/kamon/metrics/instruments/MinMaxCounter.scala b/kamon-core/src/main/scala/kamon/metrics/instruments/MinMaxCounter.scala index 7f6c2487..d6b79ce3 100644 --- a/kamon-core/src/main/scala/kamon/metrics/instruments/MinMaxCounter.scala +++ b/kamon-core/src/main/scala/kamon/metrics/instruments/MinMaxCounter.scala @@ -40,7 +40,7 @@ class MinMaxCounter { } def collect(): CounterMeasurement = { - val currentValue = sum.get() + val currentValue = if (sum.get() < 0) 0 else sum.get() val result = CounterMeasurement(abs(min.maxThenReset()), max.maxThenReset(), currentValue) max.update(currentValue) min.update(-currentValue) |