diff options
-rw-r--r-- | build.sbt | 5 | ||||
-rw-r--r-- | kamon-core/src/main/scala/kamon/ReporterRegistry.scala | 5 | ||||
-rw-r--r-- | kamon-core/src/main/scala/kamon/metric/MetricRegistry.scala | 5 | ||||
-rw-r--r-- | kamon-core/src/main/scala/kamon/package.scala | 2 | ||||
-rw-r--r-- | kamon-core/src/main/scala/kamon/trace/SpanContextCodec.scala | 2 | ||||
-rw-r--r-- | kamon-core/src/main/scala/kamon/trace/Tracer.scala | 4 |
6 files changed, 11 insertions, 12 deletions
@@ -15,7 +15,7 @@ scalaVersion := "2.11.8" -crossScalaVersions := Seq("2.12.2", "2.11.8") +crossScalaVersions := Seq("2.12.2", "2.11.8", "2.10.6") lazy val kamon = (project in file(".")) .settings(moduleName := "kamon") @@ -27,7 +27,7 @@ lazy val core = (project in file("kamon-core")) .settings(moduleName := "kamon-core") .settings( isSnapshot := true, - coverageEnabled := true, + coverageEnabled := false, scalaVersion := "2.11.8", javacOptions += "-XDignore.symbol.file", resolvers += Resolver.mavenLocal, @@ -35,7 +35,6 @@ lazy val core = (project in file("kamon-core")) "com.typesafe" % "config" % "1.3.1", "org.slf4j" % "slf4j-api" % "1.7.7", "ch.qos.logback" % "logback-classic" % "1.2.2", - "com.typesafe.scala-logging" %% "scala-logging" % "3.5.0", "org.hdrhistogram" % "HdrHistogram" % "2.1.9", "io.opentracing" % "opentracing-api" % "0.30.0", "io.opentracing" % "opentracing-util" % "0.30.0", diff --git a/kamon-core/src/main/scala/kamon/ReporterRegistry.scala b/kamon-core/src/main/scala/kamon/ReporterRegistry.scala index 49c67288..1cdef6ab 100644 --- a/kamon-core/src/main/scala/kamon/ReporterRegistry.scala +++ b/kamon-core/src/main/scala/kamon/ReporterRegistry.scala @@ -20,7 +20,6 @@ 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 @@ -258,7 +257,7 @@ class ReporterRegistryImpl(metrics: MetricsSnapshotGenerator, initialConfig: Con } private class MetricReporterTicker(snapshotGenerator: MetricsSnapshotGenerator, reporterEntries: TrieMap[Long, MetricReporterEntry]) extends Runnable { - val logger = Logger(classOf[MetricReporterTicker]) + val logger = LoggerFactory.getLogger(classOf[MetricReporterTicker]) var lastTick = System.currentTimeMillis() def run(): Unit = try { @@ -273,7 +272,7 @@ class ReporterRegistryImpl(metrics: MetricsSnapshotGenerator, initialConfig: Con if(entry.isActive) entry.reporter.reportTickSnapshot(tickSnapshot) - }(executor = entry.executionContext) + }(entry.executionContext) } lastTick = currentTick diff --git a/kamon-core/src/main/scala/kamon/metric/MetricRegistry.scala b/kamon-core/src/main/scala/kamon/metric/MetricRegistry.scala index 48ad29b7..eada120a 100644 --- a/kamon-core/src/main/scala/kamon/metric/MetricRegistry.scala +++ b/kamon-core/src/main/scala/kamon/metric/MetricRegistry.scala @@ -19,16 +19,17 @@ package metric import java.util.concurrent.atomic.AtomicReference import com.typesafe.config.Config -import com.typesafe.scalalogging.Logger import kamon.metric.InstrumentFactory.{InstrumentType, InstrumentTypes} import kamon.util.MeasurementUnit import scala.collection.concurrent.TrieMap import java.time.Duration +import org.slf4j.LoggerFactory + class MetricRegistry(initialConfig: Config) extends MetricsSnapshotGenerator { - private val logger = Logger(classOf[MetricRegistry]) + private val logger = LoggerFactory.getLogger(classOf[MetricRegistry]) private val instrumentFactory = new AtomicReference[InstrumentFactory]() private val metrics = TrieMap.empty[String, BaseMetric[_, _]] diff --git a/kamon-core/src/main/scala/kamon/package.scala b/kamon-core/src/main/scala/kamon/package.scala index 477876f8..e764d7f4 100644 --- a/kamon-core/src/main/scala/kamon/package.scala +++ b/kamon-core/src/main/scala/kamon/package.scala @@ -58,7 +58,7 @@ package object kamon { } /** - * Workaround to the non thread-safe [[scala.collection.concurrent.TrieMap#getOrElseUpdate()]] method. More details on + * Workaround to the non thread-safe [scala.collection.concurrent.TrieMap#getOrElseUpdate()] method. More details on * why this is necessary can be found at [[https://issues.scala-lang.org/browse/SI-7943]]. */ implicit class AtomicGetOrElseUpdateOnTrieMap[K, V](val trieMap: TrieMap[K, V]) extends AnyVal { diff --git a/kamon-core/src/main/scala/kamon/trace/SpanContextCodec.scala b/kamon-core/src/main/scala/kamon/trace/SpanContextCodec.scala index eba5fd5f..8e3a446b 100644 --- a/kamon-core/src/main/scala/kamon/trace/SpanContextCodec.scala +++ b/kamon-core/src/main/scala/kamon/trace/SpanContextCodec.scala @@ -17,12 +17,12 @@ package kamon.trace import java.net.{URLDecoder, URLEncoder} +import java.util.concurrent.ThreadLocalRandom import scala.collection.JavaConverters._ import io.opentracing.propagation.TextMap import kamon.util.HexCodec -import scala.concurrent.forkjoin.ThreadLocalRandom trait SpanContextCodec[T] { def inject(spanContext: SpanContext, carrier: T): Unit diff --git a/kamon-core/src/main/scala/kamon/trace/Tracer.scala b/kamon-core/src/main/scala/kamon/trace/Tracer.scala index f8af39a5..b4ec936f 100644 --- a/kamon-core/src/main/scala/kamon/trace/Tracer.scala +++ b/kamon-core/src/main/scala/kamon/trace/Tracer.scala @@ -19,19 +19,19 @@ package kamon.trace import java.util.concurrent.ThreadLocalRandom import com.typesafe.config.Config -import com.typesafe.scalalogging.Logger import io.opentracing.propagation.{Format, TextMap} import io.opentracing.propagation.Format.Builtin.{BINARY, HTTP_HEADERS, TEXT_MAP} import io.opentracing.util.ThreadLocalActiveSpanSource import kamon.ReporterRegistryImpl import kamon.metric.MetricLookup import kamon.util.Clock +import org.slf4j.LoggerFactory class Tracer(metrics: MetricLookup, reporterRegistry: ReporterRegistryImpl, initialConfig: Config) extends ThreadLocalActiveSpanSource with io.opentracing.Tracer { - private val logger = Logger(classOf[Tracer]) + private val logger = LoggerFactory.getLogger(classOf[Tracer]) private val tracerMetrics = new TracerMetrics(metrics) @volatile private var configuredSampler: Sampler = Sampler.never |