From aa1980de105ce128ba75099815f97de3d0d4b552 Mon Sep 17 00:00:00 2001 From: Ivan Topolnjak Date: Fri, 30 Jan 2015 03:25:54 +0100 Subject: + all: use ModuleSupervisor init all auto-start modules. The new ModuleSupervisor implementation will make use of special configuration keys under the `kamon.modules` section to detect all the available modules in the classpath and do two things with that info: 1. Log the AspectJ Weaver missing error if any of the available modules requires AspectJ. 2. Start all available modules that are marked with the auto-start setting. --- kamon-system-metrics/src/main/resources/reference.conf | 8 ++++++++ .../src/main/scala/kamon/system/SystemMetricsExtension.scala | 3 ++- 2 files changed, 10 insertions(+), 1 deletion(-) (limited to 'kamon-system-metrics/src') diff --git a/kamon-system-metrics/src/main/resources/reference.conf b/kamon-system-metrics/src/main/resources/reference.conf index 7f65e477..57b34195 100644 --- a/kamon-system-metrics/src/main/resources/reference.conf +++ b/kamon-system-metrics/src/main/resources/reference.conf @@ -178,4 +178,12 @@ kamon { } } + + modules { + kamon-system-metrics { + auto-start = yes + requires-aspectj = no + extension-id = "kamon.system.SystemMetrics" + } + } } \ No newline at end of file diff --git a/kamon-system-metrics/src/main/scala/kamon/system/SystemMetricsExtension.scala b/kamon-system-metrics/src/main/scala/kamon/system/SystemMetricsExtension.scala index df120611..8a27dd03 100644 --- a/kamon-system-metrics/src/main/scala/kamon/system/SystemMetricsExtension.scala +++ b/kamon-system-metrics/src/main/scala/kamon/system/SystemMetricsExtension.scala @@ -18,9 +18,10 @@ package kamon.system import java.io.File import akka.actor._ import akka.event.Logging +import kamon.supervisor.ModuleSupervisor import kamon.system.custom.{ ContextSwitchesUpdater, ContextSwitchesMetrics } import kamon.system.jmx._ -import kamon.{ ModuleSupervisor, Kamon } +import kamon.Kamon import kamon.metric._ import kamon.sigar.SigarProvisioner import kamon.system.sigar.SigarMetricsUpdater -- cgit v1.2.3