diff options
author | Diego <diegolparra@gmail.com> | 2014-12-27 17:12:09 -0300 |
---|---|---|
committer | Ivan Topolnjak <ivantopo@gmail.com> | 2014-12-28 18:12:27 +0100 |
commit | 0be6a850b1e458bdc961c956daddb8d8cc1682b5 (patch) | |
tree | 8e538108ae7007e242d9c9de8297cd5c11d81412 /kamon-statsd | |
parent | 60738af71e2f5200671d9f3762b0e90567c53898 (diff) | |
download | Kamon-0be6a850b1e458bdc961c956daddb8d8cc1682b5.tar.gz Kamon-0be6a850b1e458bdc961c956daddb8d8cc1682b5.tar.bz2 Kamon-0be6a850b1e458bdc961c956daddb8d8cc1682b5.zip |
+ statsd: includes Disk, NonHeap LoadAverage, Threads and ClassLoading metrics
Diffstat (limited to 'kamon-statsd')
-rw-r--r-- | kamon-statsd/src/main/scala/kamon/statsd/StatsD.scala | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/kamon-statsd/src/main/scala/kamon/statsd/StatsD.scala b/kamon-statsd/src/main/scala/kamon/statsd/StatsD.scala index f3f7761d..08053338 100644 --- a/kamon-statsd/src/main/scala/kamon/statsd/StatsD.scala +++ b/kamon-statsd/src/main/scala/kamon/statsd/StatsD.scala @@ -85,9 +85,21 @@ class StatsDExtension(system: ExtendedActorSystem) extends Kamon.Extension { // Subscribe to SystemMetrics val includeSystemMetrics = statsDConfig.getBoolean("report-system-metrics") if (includeSystemMetrics) { - Seq(CPUMetrics, ProcessCPUMetrics, MemoryMetrics, NetworkMetrics, GCMetrics, HeapMetrics, ContextSwitchesMetrics) foreach { metric ⇒ - Kamon(Metrics)(system).subscribe(metric, "*", statsDMetricsListener, permanently = true) - } + //OS + Kamon(Metrics)(system).subscribe(CPUMetrics, "*", statsDMetricsListener, permanently = true) + Kamon(Metrics)(system).subscribe(ProcessCPUMetrics, "*", statsDMetricsListener, permanently = true) + Kamon(Metrics)(system).subscribe(MemoryMetrics, "*", statsDMetricsListener, permanently = true) + Kamon(Metrics)(system).subscribe(NetworkMetrics, "*", statsDMetricsListener, permanently = true) + Kamon(Metrics)(system).subscribe(DiskMetrics, "*", statsDMetricsListener, permanently = true) + Kamon(Metrics)(system).subscribe(ContextSwitchesMetrics, "*", statsDMetricsListener, permanently = true) + Kamon(Metrics)(system).subscribe(LoadAverageMetrics, "*", statsDMetricsListener, permanently = true) + + //JVM + Kamon(Metrics)(system).subscribe(HeapMetrics, "*", statsDMetricsListener, permanently = true) + Kamon(Metrics)(system).subscribe(NonHeapMetrics, "*", statsDMetricsListener, permanently = true) + Kamon(Metrics)(system).subscribe(ThreadMetrics, "*", statsDMetricsListener, permanently = true) + Kamon(Metrics)(system).subscribe(ClassLoadingMetrics, "*", statsDMetricsListener, permanently = true) + Kamon(Metrics)(system).subscribe(GCMetrics, "*", statsDMetricsListener, permanently = true) } def buildMetricsListener(tickInterval: Long, flushInterval: Long, keyGeneratorFQCN: String, config: Config): ActorRef = { |