aboutsummaryrefslogtreecommitdiff
path: root/kamon-core/src/main/scala/kamon/ReporterRegistry.scala
diff options
context:
space:
mode:
authorIvan Topolnjak <ivantopo@gmail.com>2017-06-18 10:33:08 +0200
committerIvan Topolnjak <ivantopo@gmail.com>2017-06-18 10:33:47 +0200
commit90a77097bd579aa6fd8b8cd0ac498e44ae6732d0 (patch)
tree335e3c1b3f8ca0a241aca5f712f25d992bc627ed /kamon-core/src/main/scala/kamon/ReporterRegistry.scala
parentcf6f369b9d7cb6135f6f321da7be8c3f7d538fd4 (diff)
downloadKamon-90a77097bd579aa6fd8b8cd0ac498e44ae6732d0.tar.gz
Kamon-90a77097bd579aa6fd8b8cd0ac498e44ae6732d0.tar.bz2
Kamon-90a77097bd579aa6fd8b8cd0ac498e44ae6732d0.zip
schedule execution of the start hooks on reporters
Diffstat (limited to 'kamon-core/src/main/scala/kamon/ReporterRegistry.scala')
-rw-r--r--kamon-core/src/main/scala/kamon/ReporterRegistry.scala5
1 files changed, 5 insertions, 0 deletions
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()