aboutsummaryrefslogtreecommitdiff
path: root/kamon-core/src/main/scala/kamon/ReporterRegistry.scala
diff options
context:
space:
mode:
authorIvan Topolnjak <ivantopo@gmail.com>2017-05-26 15:29:41 +0200
committerIvan Topolnjak <ivantopo@gmail.com>2017-05-26 15:29:41 +0200
commit1f5d9876dedb715ae1c31203ea4f15ebf031612c (patch)
tree9ae42e1aaac6cdb550e7707c9ae5a49048482109 /kamon-core/src/main/scala/kamon/ReporterRegistry.scala
parenta3d78ef61a277b0b62dc93daf84756dfa7625d3d (diff)
downloadKamon-1f5d9876dedb715ae1c31203ea4f15ebf031612c.tar.gz
Kamon-1f5d9876dedb715ae1c31203ea4f15ebf031612c.tar.bz2
Kamon-1f5d9876dedb715ae1c31203ea4f15ebf031612c.zip
on the crazy path to a better Kamon :D
Diffstat (limited to 'kamon-core/src/main/scala/kamon/ReporterRegistry.scala')
-rw-r--r--kamon-core/src/main/scala/kamon/ReporterRegistry.scala18
1 files changed, 9 insertions, 9 deletions
diff --git a/kamon-core/src/main/scala/kamon/ReporterRegistry.scala b/kamon-core/src/main/scala/kamon/ReporterRegistry.scala
index 11312512..3b59d8b7 100644
--- a/kamon-core/src/main/scala/kamon/ReporterRegistry.scala
+++ b/kamon-core/src/main/scala/kamon/ReporterRegistry.scala
@@ -5,9 +5,9 @@ import java.util.concurrent.atomic.{AtomicLong, AtomicReference}
import java.util.concurrent._
import com.typesafe.config.Config
+import com.typesafe.scalalogging.Logger
import kamon.metric._
import kamon.trace.Span
-import org.slf4j.LoggerFactory
import scala.concurrent.{ExecutionContext, ExecutionContextExecutorService, Future}
import scala.util.Try
@@ -29,22 +29,22 @@ trait Registration {
}
trait MetricsReporter {
- def start(config: Config): Unit
- def reconfigure(config: Config): Unit
+ def start(): Unit
def stop(): Unit
- def reportTickSnapshot(snapshot: TickSnapshot)
+ def reconfigure(config: Config): Unit
+ def reportTickSnapshot(snapshot: TickSnapshot): Unit
}
trait SpansReporter {
- def start(config: Config): Unit
- def reconfigure(config: Config): Unit
+ def start(): Unit
def stop(): Unit
+ def reconfigure(config: Config): Unit
def reportSpan(span: Span.CompletedSpan): Unit
}
-class ReporterRegistryImpl(metrics: RegistrySnapshotGenerator, initialConfig: Config) extends ReporterRegistry {
+class ReporterRegistryImpl(metrics: MetricsSnapshotGenerator, 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,8 +141,8 @@ class ReporterRegistryImpl(metrics: RegistrySnapshotGenerator, initialConfig: Co
executionContext: ExecutionContextExecutorService
)
- private class MetricTicker(snapshotGenerator: RegistrySnapshotGenerator, reporterEntries: java.util.Queue[ReporterEntry]) extends Runnable {
- val logger = LoggerFactory.getLogger(classOf[MetricTicker])
+ private class MetricTicker(snapshotGenerator: MetricsSnapshotGenerator, reporterEntries: java.util.Queue[ReporterEntry]) extends Runnable {
+ val logger = Logger(classOf[MetricTicker])
var lastTick = Instant.now()
def run(): Unit = try {