diff options
Diffstat (limited to 'kamon-core/src/main/scala/kamon/ReporterRegistry.scala')
-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 } |