diff options
author | Ivan Topolnak <itopolnak@despegar.com> | 2013-05-06 18:09:38 -0300 |
---|---|---|
committer | Ivan Topolnak <itopolnak@despegar.com> | 2013-05-06 18:09:38 -0300 |
commit | 50cc3a5a6508e390746f590ea83e5473367dd59e (patch) | |
tree | 86654181e778889385a2d3c3167c363d8d8e23f6 /src/main/scala | |
parent | 2f81f03742860a0a57cebeea6f0160f3c0d80a48 (diff) | |
download | Kamon-50cc3a5a6508e390746f590ea83e5473367dd59e.tar.gz Kamon-50cc3a5a6508e390746f590ea83e5473367dd59e.tar.bz2 Kamon-50cc3a5a6508e390746f590ea83e5473367dd59e.zip |
fixed the metric being reported to newrelic
Diffstat (limited to 'src/main/scala')
-rw-r--r-- | src/main/scala/akka/ActorAspect.scala | 1 | ||||
-rw-r--r-- | src/main/scala/kamon/metric/NewRelicReporter.scala | 5 |
2 files changed, 5 insertions, 1 deletions
diff --git a/src/main/scala/akka/ActorAspect.scala b/src/main/scala/akka/ActorAspect.scala index 2550752b..db96279c 100644 --- a/src/main/scala/akka/ActorAspect.scala +++ b/src/main/scala/akka/ActorAspect.scala @@ -14,6 +14,7 @@ class ActorAspect extends Metrics { @Around("actorReceive() && this(actor)") def around(pjp: ProceedingJoinPoint, actor: akka.actor.ActorCell): AnyRef = { + //println("The path is: "+actor.self.path.) val actorName:String = actor.self.path.toString markAndCountMeter(actorName){ diff --git a/src/main/scala/kamon/metric/NewRelicReporter.scala b/src/main/scala/kamon/metric/NewRelicReporter.scala index fa6b29f3..7684a746 100644 --- a/src/main/scala/kamon/metric/NewRelicReporter.scala +++ b/src/main/scala/kamon/metric/NewRelicReporter.scala @@ -10,7 +10,10 @@ class NewRelicReporter(registry: MetricsRegistry, name: String) extends Abstract def processMeter(name: MetricName, meter: Metered, context: String) { println(s"Logging to NewRelic: ${meter.count()}") - NewRelic.recordMetric("Custom/Actor/MessagesPerSecond", meter.count()) + NewRelic.recordMetric("Custom/Actor/MessagesPerSecond", meter.meanRate().toFloat) + + + } |