diff options
author | Ivan Topolnak <itopolnak@despegar.com> | 2014-03-07 18:08:01 -0300 |
---|---|---|
committer | Ivan Topolnjak <ivantopo@gmail.com> | 2014-03-11 21:14:53 -0300 |
commit | b6af84ab6b60b4ca6c0389c8c3622db3d3c27915 (patch) | |
tree | 1f89896820e36d59daadef7699b434de1051be42 /kamon-newrelic/src/main/scala/kamon/newrelic/MetricTranslator.scala | |
parent | ccbcc55282251b5e6d4f41384730232a8f0e7d05 (diff) | |
download | Kamon-b6af84ab6b60b4ca6c0389c8c3622db3d3c27915.tar.gz Kamon-b6af84ab6b60b4ca6c0389c8c3622db3d3c27915.tar.bz2 Kamon-b6af84ab6b60b4ca6c0389c8c3622db3d3c27915.zip |
multiple fixes to the custom metrics collection facilities
Diffstat (limited to 'kamon-newrelic/src/main/scala/kamon/newrelic/MetricTranslator.scala')
-rw-r--r-- | kamon-newrelic/src/main/scala/kamon/newrelic/MetricTranslator.scala | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/kamon-newrelic/src/main/scala/kamon/newrelic/MetricTranslator.scala b/kamon-newrelic/src/main/scala/kamon/newrelic/MetricTranslator.scala index 0162dd9c..46e22571 100644 --- a/kamon-newrelic/src/main/scala/kamon/newrelic/MetricTranslator.scala +++ b/kamon-newrelic/src/main/scala/kamon/newrelic/MetricTranslator.scala @@ -20,15 +20,16 @@ import akka.actor.{ Props, ActorRef, Actor } import kamon.metrics.Subscriptions.TickMetricSnapshot import kamon.newrelic.MetricTranslator.TimeSliceMetrics -class MetricTranslator(receiver: ActorRef) extends Actor with WebTransactionMetrics { +class MetricTranslator(receiver: ActorRef) extends Actor + with WebTransactionMetrics with CustomMetrics { def receive = { case TickMetricSnapshot(from, to, metrics) ⇒ - val scaledFrom = (from / 1E3).toInt - val scaledTo = (to / 1E3).toInt - val allMetrics = collectWebTransactionMetrics(metrics) + val fromInSeconds = (from / 1E3).toInt + val toInSeconds = (to / 1E3).toInt + val allMetrics = collectWebTransactionMetrics(metrics) ++ collectCustomMetrics(metrics) - receiver ! TimeSliceMetrics(scaledFrom, scaledTo, allMetrics) + receiver ! TimeSliceMetrics(fromInSeconds, toInSeconds, allMetrics) } } |