diff options
author | Florent Chiron <florentchiron@gmail.com> | 2018-10-19 14:54:30 +0200 |
---|---|---|
committer | Ivan Topolnjak <ivantopo@gmail.com> | 2018-10-19 14:54:30 +0200 |
commit | d0a0dfe886952ba924adacaabf85cb96ce5fe032 (patch) | |
tree | 43c79c2258f3d606744880c6bd59bbe78e547a6d /kamon-core/src/main/scala/kamon | |
parent | 108fdef3eca8a88ec3774c465fdb0a3c764aa936 (diff) | |
download | Kamon-d0a0dfe886952ba924adacaabf85cb96ce5fe032.tar.gz Kamon-d0a0dfe886952ba924adacaabf85cb96ce5fe032.tar.bz2 Kamon-d0a0dfe886952ba924adacaabf85cb96ce5fe032.zip |
Use new config when reconfiguring tickers in ReporterRegistry (#554)
Diffstat (limited to 'kamon-core/src/main/scala/kamon')
-rw-r--r-- | kamon-core/src/main/scala/kamon/ReporterRegistry.scala | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/kamon-core/src/main/scala/kamon/ReporterRegistry.scala b/kamon-core/src/main/scala/kamon/ReporterRegistry.scala index ee70de4a..06b9761a 100644 --- a/kamon-core/src/main/scala/kamon/ReporterRegistry.scala +++ b/kamon-core/src/main/scala/kamon/ReporterRegistry.scala @@ -195,12 +195,13 @@ object ReporterRegistry { } private[kamon] def reconfigure(config: Config): Unit = synchronized { - val newConfig = readRegistryConfiguration(config) + val oldConfig = registryConfiguration + registryConfiguration = readRegistryConfiguration(config) - if(newConfig.metricTickInterval != registryConfiguration.metricTickInterval && metricReporters.nonEmpty) + if(oldConfig.metricTickInterval != registryConfiguration.metricTickInterval && metricReporters.nonEmpty) reStartMetricTicker() - if(newConfig.traceTickInterval != registryConfiguration.traceTickInterval && spanReporters.nonEmpty) + if(oldConfig.traceTickInterval != registryConfiguration.traceTickInterval && spanReporters.nonEmpty) reStartTraceTicker() // Reconfigure all registered reporters @@ -224,8 +225,6 @@ object ReporterRegistry { } }(entry.executionContext) } - - registryConfiguration = newConfig } |