diff options
author | Ivan Topolnjak <ivantopo@gmail.com> | 2017-05-25 16:52:52 +0200 |
---|---|---|
committer | Ivan Topolnjak <ivantopo@gmail.com> | 2017-05-25 16:52:52 +0200 |
commit | a3d78ef61a277b0b62dc93daf84756dfa7625d3d (patch) | |
tree | 4fee7ce93ecfb4e32c7aaaa22efb75ed07c667f6 /kamon-core/src/main/scala/kamon/ReporterRegistry.scala | |
parent | 22379d3f318b2cd3a4c995ff1c45bda33d935a46 (diff) | |
download | Kamon-a3d78ef61a277b0b62dc93daf84756dfa7625d3d.tar.gz Kamon-a3d78ef61a277b0b62dc93daf84756dfa7625d3d.tar.bz2 Kamon-a3d78ef61a277b0b62dc93daf84756dfa7625d3d.zip |
trying to flatten out the structure and eliminate the notion of entitites
Diffstat (limited to 'kamon-core/src/main/scala/kamon/ReporterRegistry.scala')
-rw-r--r-- | kamon-core/src/main/scala/kamon/ReporterRegistry.scala | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/kamon-core/src/main/scala/kamon/ReporterRegistry.scala b/kamon-core/src/main/scala/kamon/ReporterRegistry.scala index 98bde946..11312512 100644 --- a/kamon-core/src/main/scala/kamon/ReporterRegistry.scala +++ b/kamon-core/src/main/scala/kamon/ReporterRegistry.scala @@ -44,7 +44,7 @@ trait SpansReporter { def reportSpan(span: Span.CompletedSpan): Unit } -class ReporterRegistryImpl(metrics: RecorderRegistryImpl, initialConfig: Config) extends ReporterRegistry { +class ReporterRegistryImpl(metrics: RegistrySnapshotGenerator, initialConfig: Config) extends ReporterRegistry { private val registryExecutionContext = Executors.newSingleThreadScheduledExecutor(threadFactory("kamon-reporter-registry")) private val metricsTickerSchedule = new AtomicReference[ScheduledFuture[_]]() private val metricReporters = new ConcurrentLinkedQueue[ReporterEntry]() @@ -141,7 +141,7 @@ class ReporterRegistryImpl(metrics: RecorderRegistryImpl, initialConfig: Config) executionContext: ExecutionContextExecutorService ) - private class MetricTicker(metricsImpl: RecorderRegistryImpl, reporterEntries: java.util.Queue[ReporterEntry]) extends Runnable { + private class MetricTicker(snapshotGenerator: RegistrySnapshotGenerator, reporterEntries: java.util.Queue[ReporterEntry]) extends Runnable { val logger = LoggerFactory.getLogger(classOf[MetricTicker]) var lastTick = Instant.now() @@ -149,7 +149,7 @@ class ReporterRegistryImpl(metrics: RecorderRegistryImpl, initialConfig: Config) val currentTick = Instant.now() val tickSnapshot = TickSnapshot( interval = Interval(lastTick, currentTick), - entities = metricsImpl.snapshot() + metrics = snapshotGenerator.snapshot() ) reporterEntries.forEach { entry => |