File tree Expand file tree Collapse file tree 2 files changed +20
-3
lines changed
core/kamon-core/src/main/scala/kamon
instrumentation/kamon-play/src/main/scala/kamon/instrumentation/play Expand file tree Collapse file tree 2 files changed +20
-3
lines changed Original file line number Diff line number Diff line change @@ -55,7 +55,25 @@ trait Init { self: ModuleManagement with Configuration with CurrentStatus with M
5555 self.moduleRegistry().init()
5656
5757 }
58-
58+
59+ /**
60+ * Initializes Kamon without trying to attach the instrumentation agent from the Kamon Bundle.
61+ */
62+ def initWithoutAttaching (): Unit = {
63+ self.initScheduler()
64+ self.loadModules()
65+ self.moduleRegistry().init()
66+ }
67+
68+ /**
69+ * Initializes Kamon without trying to attach the instrumentation agent from the Kamon Bundle.
70+ */
71+ def initWithoutAttaching (config : Config ): Unit = {
72+ self.reconfigure(config)
73+ self.initWithoutAttaching()
74+ }
75+
76+
5977 def stop (): Future [Unit ] = {
6078 self.clearRegistry()
6179 self.stopScheduler()
Original file line number Diff line number Diff line change @@ -36,8 +36,7 @@ object GuiceModule {
3636 Logger (classOf [KamonLoader ]).info(" Reconfiguring Kamon with Play's Config" )
3737 Logger (classOf [KamonLoader ]).info(configuration.underlying.getString(" play.server.provider" ))
3838 Logger (classOf [KamonLoader ]).info(configuration.underlying.getString(" kamon.trace.tick-interval" ))
39- Kamon .reconfigure(configuration.underlying)
40- Kamon .loadModules()
39+ Kamon .initWithoutAttaching(configuration.underlying)
4140
4241 lifecycle.addStopHook { () =>
4342 Logger (classOf [KamonLoader ]).info(" Stopping Kamon" )
You can’t perform that action at this time.
0 commit comments