diff options
author | Ivan Topolnjak <ivantopo@gmail.com> | 2015-04-17 19:11:41 +0200 |
---|---|---|
committer | Ivan Topolnjak <ivantopo@gmail.com> | 2015-04-17 19:11:41 +0200 |
commit | eb07f2f0b583c759e9cfaba27e3bcddeaf05a4cf (patch) | |
tree | 57784857799de642dcd76be931027cf04cb56f67 /kamon-system-metrics/src | |
parent | 2731db2910827f0bf22484d0e5603788795b69f9 (diff) | |
download | Kamon-eb07f2f0b583c759e9cfaba27e3bcddeaf05a4cf.tar.gz Kamon-eb07f2f0b583c759e9cfaba27e3bcddeaf05a4cf.tar.bz2 Kamon-eb07f2f0b583c759e9cfaba27e3bcddeaf05a4cf.zip |
= core: add commodity trace context manipulation methods to the Tracer.
Diffstat (limited to 'kamon-system-metrics/src')
3 files changed, 6 insertions, 6 deletions
diff --git a/kamon-system-metrics/src/main/scala/kamon/system/jmx/GarbageCollectionMetrics.scala b/kamon-system-metrics/src/main/scala/kamon/system/jmx/GarbageCollectionMetrics.scala index 7a5770d8..2e9ea954 100644 --- a/kamon-system-metrics/src/main/scala/kamon/system/jmx/GarbageCollectionMetrics.scala +++ b/kamon-system-metrics/src/main/scala/kamon/system/jmx/GarbageCollectionMetrics.scala @@ -19,7 +19,7 @@ package kamon.system.jmx import java.lang.management.{ GarbageCollectorMXBean, ManagementFactory } import kamon.Kamon -import kamon.metric.{ EntityRecorderFactory, Entity, Metrics, GenericEntityRecorder } +import kamon.metric._ import kamon.metric.instrument.{ DifferentialValueCollector, Time, InstrumentFactory } import scala.collection.JavaConverters._ @@ -44,7 +44,7 @@ object GarbageCollectionMetrics { def sanitizeCollectorName(name: String): String = name.replaceAll("""[^\w]""", "-").toLowerCase - def register(metricsExtension: Metrics): Unit = { + def register(metricsExtension: MetricsModule): Unit = { ManagementFactory.getGarbageCollectorMXBeans.asScala.filter(_.isValid) map { gc ⇒ val gcName = sanitizeCollectorName(gc.getName) Kamon.metrics.entity(EntityRecorderFactory("system-metric", new GarbageCollectionMetrics(gc, _)), s"$gcName-garbage-collector") 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 15bd399e..2a86c13c 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,10 +17,10 @@ package kamon.system.jmx import kamon.metric.instrument.InstrumentFactory -import kamon.metric.{ EntityRecorderFactory, EntityRecorder, Metrics } +import kamon.metric.{ MetricsModule, EntityRecorderFactory, EntityRecorder } abstract class JmxSystemMetricRecorderCompanion(metricName: String) { - def register(metricsExtension: Metrics): EntityRecorder = + def register(metricsExtension: MetricsModule): EntityRecorder = metricsExtension.entity(EntityRecorderFactory("system-metric", apply(_)), metricName) def apply(instrumentFactory: InstrumentFactory): EntityRecorder diff --git a/kamon-system-metrics/src/main/scala/kamon/system/sigar/SigarMetricsUpdater.scala b/kamon-system-metrics/src/main/scala/kamon/system/sigar/SigarMetricsUpdater.scala index a1bd3e01..5e5f7518 100644 --- a/kamon-system-metrics/src/main/scala/kamon/system/sigar/SigarMetricsUpdater.scala +++ b/kamon-system-metrics/src/main/scala/kamon/system/sigar/SigarMetricsUpdater.scala @@ -19,7 +19,7 @@ package kamon.system.sigar import akka.actor.{ Props, Actor } import kamon.Kamon import kamon.metric.instrument.InstrumentFactory -import kamon.metric.{ EntityRecorderFactory, Entity, EntityRecorder, Metrics } +import kamon.metric._ import kamon.system.sigar.SigarMetricsUpdater.UpdateSigarMetrics import org.hyperic.sigar.Sigar @@ -65,7 +65,7 @@ trait SigarMetric extends EntityRecorder { } abstract class SigarMetricRecorderCompanion(metricName: String) { - def register(sigar: Sigar, metricsExtension: Metrics): SigarMetric = + def register(sigar: Sigar, metricsExtension: MetricsModule): SigarMetric = metricsExtension.entity(EntityRecorderFactory("system-metric", apply(sigar, _)), metricName) def apply(sigar: Sigar, instrumentFactory: InstrumentFactory): SigarMetric |