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
commit30a91e935445d764d58d9e329236e9696264eeff (patch)
tree4f2765bbc7be1cb75b623bd688eb9a5cc187275c /kamon-core/src/main/scala/kamon/Kamon.scala
parent1cfe038ff70cc459515d2ee6eb3ae216c823ec47 (diff)
downloadKamon-30a91e935445d764d58d9e329236e9696264eeff.tar.gz
Kamon-30a91e935445d764d58d9e329236e9696264eeff.tar.bz2
Kamon-30a91e935445d764d58d9e329236e9696264eeff.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()
}