From 90a77097bd579aa6fd8b8cd0ac498e44ae6732d0 Mon Sep 17 00:00:00 2001 From: Ivan Topolnjak Date: Sun, 18 Jun 2017 10:33:08 +0200 Subject: schedule execution of the start hooks on reporters --- kamon-core/src/main/scala/kamon/ReporterRegistry.scala | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'kamon-core/src/main/scala/kamon/ReporterRegistry.scala') diff --git a/kamon-core/src/main/scala/kamon/ReporterRegistry.scala b/kamon-core/src/main/scala/kamon/ReporterRegistry.scala index e18b6a78..6c8622d4 100644 --- a/kamon-core/src/main/scala/kamon/ReporterRegistry.scala +++ b/kamon-core/src/main/scala/kamon/ReporterRegistry.scala @@ -120,11 +120,14 @@ class ReporterRegistryImpl(metrics: MetricsSnapshotGenerator, initialConfig: Con executionContext = ExecutionContext.fromExecutorService(executor) ) + Future(reporterEntry.reporter.start())(reporterEntry.executionContext) + if(metricReporters.isEmpty) reStartMetricTicker() metricReporters.put(reporterEntry.id, reporterEntry) createRegistration(reporterEntry.id, metricReporters) + } private def addSpanReporter(reporter: SpanReporter, name: String): Registration = synchronized { @@ -136,6 +139,8 @@ class ReporterRegistryImpl(metrics: MetricsSnapshotGenerator, initialConfig: Con executionContext = ExecutionContext.fromExecutorService(executor) ) + Future(reporterEntry.reporter.start())(reporterEntry.executionContext) + if(spanReporters.isEmpty) reStartTraceTicker() -- cgit v1.2.3