aboutsummaryrefslogtreecommitdiff
path: root/kamon-core/src/main/scala/kamon/Kamon.scala
diff options
context:
space:
mode:
authorIvan Topolnjak <ivantopo@gmail.com>2015-01-30 03:25:54 +0100
committerIvan Topolnjak <ivantopo@gmail.com>2015-01-30 03:25:54 +0100
commitaa1980de105ce128ba75099815f97de3d0d4b552 (patch)
tree4ca0acdd72f8316ef778f5702c8ad40af613884f /kamon-core/src/main/scala/kamon/Kamon.scala
parented950a320c7b3edba36d07288a69fb0049b33063 (diff)
downloadKamon-aa1980de105ce128ba75099815f97de3d0d4b552.tar.gz
Kamon-aa1980de105ce128ba75099815f97de3d0d4b552.tar.bz2
Kamon-aa1980de105ce128ba75099815f97de3d0d4b552.zip
+ 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.
Diffstat (limited to 'kamon-core/src/main/scala/kamon/Kamon.scala')
-rw-r--r--kamon-core/src/main/scala/kamon/Kamon.scala6
1 files changed, 5 insertions, 1 deletions
diff --git a/kamon-core/src/main/scala/kamon/Kamon.scala b/kamon-core/src/main/scala/kamon/Kamon.scala
index d29061f8..6fedc065 100644
--- a/kamon-core/src/main/scala/kamon/Kamon.scala
+++ b/kamon-core/src/main/scala/kamon/Kamon.scala
@@ -18,6 +18,7 @@ import _root_.akka.actor
import _root_.akka.actor._
import com.typesafe.config.Config
import kamon.metric._
+import kamon.supervisor.ModuleSupervisor
import kamon.trace.{ Tracer, TracerExtension }
class Kamon(val actorSystem: ActorSystem) {
@@ -25,7 +26,10 @@ class Kamon(val actorSystem: ActorSystem) {
val tracer: TracerExtension = Tracer.get(actorSystem)
val userMetrics: UserMetricsExtension = UserMetrics.get(actorSystem)
- def shutdown: Unit =
+ // This will cause all auto-start modules to initiate.
+ ModuleSupervisor.get(actorSystem)
+
+ def shutdown(): Unit =
actorSystem.shutdown()
}