aboutsummaryrefslogtreecommitdiff
path: root/kamon-system-metrics/src/main/scala/kamon/system/jmx/JmxSystemMetricRecorderCompanion.scala
diff options
context:
space:
mode:
authorIvan Topolnjak <ivantopo@gmail.com>2015-03-05 23:39:44 +0100
committerIvan Topolnjak <ivantopo@gmail.com>2015-03-09 23:09:08 +0100
commit959ce3573253ec4ac5b837d8a9c9e70f1f80bd6b (patch)
tree27c1fe8f22429fe3820f988ab17caaf8e4a6fa3a /kamon-system-metrics/src/main/scala/kamon/system/jmx/JmxSystemMetricRecorderCompanion.scala
parent69ea63923e0d3697f8ca4c7eb9cb808821832aa2 (diff)
downloadKamon-959ce3573253ec4ac5b837d8a9c9e70f1f80bd6b.tar.gz
Kamon-959ce3573253ec4ac5b837d8a9c9e70f1f80bd6b.tar.bz2
Kamon-959ce3573253ec4ac5b837d8a9c9e70f1f80bd6b.zip
! all: introduced support for metric tags.
Diffstat (limited to 'kamon-system-metrics/src/main/scala/kamon/system/jmx/JmxSystemMetricRecorderCompanion.scala')
-rw-r--r--kamon-system-metrics/src/main/scala/kamon/system/jmx/JmxSystemMetricRecorderCompanion.scala8
1 files changed, 3 insertions, 5 deletions
diff --git a/kamon-system-metrics/src/main/scala/kamon/system/jmx/JmxSystemMetricRecorderCompanion.scala b/kamon-system-metrics/src/main/scala/kamon/system/jmx/JmxSystemMetricRecorderCompanion.scala
index 8837aec0..15bd399e 100644
--- a/kamon-system-metrics/src/main/scala/kamon/system/jmx/JmxSystemMetricRecorderCompanion.scala
+++ b/kamon-system-metrics/src/main/scala/kamon/system/jmx/JmxSystemMetricRecorderCompanion.scala
@@ -17,13 +17,11 @@
package kamon.system.jmx
import kamon.metric.instrument.InstrumentFactory
-import kamon.metric.{ Entity, EntityRecorder, Metrics }
+import kamon.metric.{ EntityRecorderFactory, EntityRecorder, Metrics }
abstract class JmxSystemMetricRecorderCompanion(metricName: String) {
- def register(metricsExtension: Metrics): EntityRecorder = {
- val instrumentFactory = metricsExtension.instrumentFactory("system-metric")
- metricsExtension.register(Entity(metricName, "system-metric"), apply(instrumentFactory)).recorder
- }
+ def register(metricsExtension: Metrics): EntityRecorder =
+ metricsExtension.entity(EntityRecorderFactory("system-metric", apply(_)), metricName)
def apply(instrumentFactory: InstrumentFactory): EntityRecorder
} \ No newline at end of file