aboutsummaryrefslogtreecommitdiff
path: root/src/main/scala/kamon/metric/NewRelicReporter.scala
diff options
context:
space:
mode:
authorIvan Topolnak <ivantopo@gmail.com>2013-07-15 18:14:07 -0300
committerIvan Topolnak <ivantopo@gmail.com>2013-07-15 18:14:07 -0300
commitafda5a6ac02a5cd314638e40250b49f66cf3b419 (patch)
treed0f2337f570d883497e78c482629f2af60c95366 /src/main/scala/kamon/metric/NewRelicReporter.scala
parente8dd6c83986f1ecd2d717c39bffe900b23b68854 (diff)
downloadKamon-afda5a6ac02a5cd314638e40250b49f66cf3b419.tar.gz
Kamon-afda5a6ac02a5cd314638e40250b49f66cf3b419.tar.bz2
Kamon-afda5a6ac02a5cd314638e40250b49f66cf3b419.zip
still a disaster, need to sync
Diffstat (limited to 'src/main/scala/kamon/metric/NewRelicReporter.scala')
-rw-r--r--src/main/scala/kamon/metric/NewRelicReporter.scala11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/main/scala/kamon/metric/NewRelicReporter.scala b/src/main/scala/kamon/metric/NewRelicReporter.scala
index 67ee1ba5..70f3e54a 100644
--- a/src/main/scala/kamon/metric/NewRelicReporter.scala
+++ b/src/main/scala/kamon/metric/NewRelicReporter.scala
@@ -1,6 +1,7 @@
package kamon.metric
-import com.codahale.metrics._
+import com.codahale.metrics
+import metrics._
import java.util.concurrent.TimeUnit
import java.util
import com.newrelic.api.agent.NewRelic
@@ -9,6 +10,8 @@ import scala.collection.JavaConverters._
class NewRelicReporter(registry: MetricRegistry, name: String,filter: MetricFilter, rateUnit: TimeUnit, durationUnit: TimeUnit) extends ScheduledReporter(registry, name, filter, rateUnit, durationUnit) {
+
+
private[NewRelicReporter] def processMeter(name: String, meter: Meter) {
NewRelic.recordMetric("Custom/Actor/MessagesPerSecond", meter.getMeanRate().toFloat)
}
@@ -25,7 +28,7 @@ class NewRelicReporter(registry: MetricRegistry, name: String,filter: MetricFilt
}*/
- def report(gauges: util.SortedMap[String, Gauge[_]], counters: util.SortedMap[String, Counter], histograms: util.SortedMap[String, Histogram], meters: util.SortedMap[String, Meter], timers: util.SortedMap[String, Timer]) {
+ def report(gauges: util.SortedMap[String, Gauge[_]], counters: util.SortedMap[String, Counter], histograms: util.SortedMap[String, metrics.Histogram], meters: util.SortedMap[String, Meter], timers: util.SortedMap[String, Timer]) {
//Process Meters
meters.asScala.map{case(name, meter) => processMeter(name, meter)}
@@ -39,8 +42,10 @@ class NewRelicReporter(registry: MetricRegistry, name: String,filter: MetricFilt
NewRelic.recordMetric(fullMetricName, measure)
}}
}
+
+
}
object NewRelicReporter {
- def apply(registry: MetricRegistry) = new NewRelicReporter(registry, "NewRelic-reporter", MetricFilter.ALL, TimeUnit.SECONDS, TimeUnit.MILLISECONDS)
+ def apply(registry: MetricRegistry) = new NewRelicReporter(registry, "NewRelic-reporter", metrics.MetricFilter.ALL, TimeUnit.SECONDS, TimeUnit.MILLISECONDS)
} \ No newline at end of file