diff options
Diffstat (limited to 'kamon-core/src/main/scala')
-rw-r--r-- | kamon-core/src/main/scala/kamon/Kamon.scala | 8 | ||||
-rw-r--r-- | kamon-core/src/main/scala/kamon/trace/MetricsOnlyContext.scala | 4 |
2 files changed, 5 insertions, 7 deletions
diff --git a/kamon-core/src/main/scala/kamon/Kamon.scala b/kamon-core/src/main/scala/kamon/Kamon.scala index 9f6e58ee..6ac91356 100644 --- a/kamon-core/src/main/scala/kamon/Kamon.scala +++ b/kamon-core/src/main/scala/kamon/Kamon.scala @@ -63,14 +63,12 @@ object Kamon { private def tryLoadAutoweaveModule(): Unit = { val color = (msg: String) ⇒ s"""\u001B[32m${msg}\u001B[0m""" - Try { + log.info("Trying to load kamon-autoweave...") - log.info("Trying to load kamon-autoweave...") + Try { val autoweave = Class.forName("kamon.autoweave.Autoweave") - val instance = autoweave.newInstance() - - autoweave.getDeclaredMethod("attach").invoke(instance) + autoweave.getDeclaredMethod("attach").invoke(autoweave.newInstance()) } match { case Success(_) ⇒ diff --git a/kamon-core/src/main/scala/kamon/trace/MetricsOnlyContext.scala b/kamon-core/src/main/scala/kamon/trace/MetricsOnlyContext.scala index 7ef3ac14..34b68f38 100644 --- a/kamon-core/src/main/scala/kamon/trace/MetricsOnlyContext.scala +++ b/kamon-core/src/main/scala/kamon/trace/MetricsOnlyContext.scala @@ -72,13 +72,13 @@ private[kamon] class MetricsOnlyContext(traceName: String, val token: String, tr @tailrec private def drainFinishedSegments(): Unit = { val segment = _finishedSegments.poll() if (segment != null) { - val deefaultTags = Map( + val defaultTags = Map( "trace" -> name, "category" -> segment.category, "library" -> segment.library) if (Kamon.metrics.shouldTrack(segment.name, SegmentMetrics.category)) - Kamon.metrics.entity(SegmentMetrics, segment.name, deefaultTags ++ segment.tags).elapsedTime.record(segment.duration.nanos) + Kamon.metrics.entity(SegmentMetrics, segment.name, defaultTags ++ segment.tags).elapsedTime.record(segment.duration.nanos) drainFinishedSegments() } } |