diff options
author | Ivan Topolnjak <ivantopo@gmail.com> | 2015-02-15 11:16:21 +0100 |
---|---|---|
committer | Ivan Topolnjak <ivantopo@gmail.com> | 2015-02-15 11:16:21 +0100 |
commit | cd300053cfec39dc75c1ea47b08ab5c78fe3f4bb (patch) | |
tree | 0f07e794e6fb88e180913a10f57ffaa4e2fa03cc /kamon-scala/src/test/scala/kamon | |
parent | 8a532fc8c95a5700721248b6b4f558d9a1dcebcb (diff) | |
download | Kamon-cd300053cfec39dc75c1ea47b08ab5c78fe3f4bb.tar.gz Kamon-cd300053cfec39dc75c1ea47b08ab5c78fe3f4bb.tar.bz2 Kamon-cd300053cfec39dc75c1ea47b08ab5c78fe3f4bb.zip |
! core: move the TraceContext manipulation API to the Tracer companion object.
Diffstat (limited to 'kamon-scala/src/test/scala/kamon')
-rw-r--r-- | kamon-scala/src/test/scala/kamon/scala/instrumentation/FutureInstrumentationSpec.scala | 14 | ||||
-rw-r--r-- | kamon-scala/src/test/scala/kamon/scalaz/instrumentation/FutureInstrumentationSpec.scala | 14 |
2 files changed, 14 insertions, 14 deletions
diff --git a/kamon-scala/src/test/scala/kamon/scala/instrumentation/FutureInstrumentationSpec.scala b/kamon-scala/src/test/scala/kamon/scala/instrumentation/FutureInstrumentationSpec.scala index d70e88ae..dd16e83f 100644 --- a/kamon-scala/src/test/scala/kamon/scala/instrumentation/FutureInstrumentationSpec.scala +++ b/kamon-scala/src/test/scala/kamon/scala/instrumentation/FutureInstrumentationSpec.scala @@ -16,7 +16,7 @@ package kamon.scala.instrumentation import kamon.testkit.BaseKamonSpec -import kamon.trace.TraceContext +import kamon.trace.Tracer import org.scalatest.OptionValues import org.scalatest.concurrent.{ PatienceConfiguration, ScalaFutures } @@ -31,10 +31,10 @@ class FutureInstrumentationSpec extends BaseKamonSpec("future-instrumentation-sp "capture the TraceContext available when created" which { "must be available when executing the future's body" in { - val (future, testTraceContext) = TraceContext.withContext(newContext("future-body")) { - val future = Future(TraceContext.currentContext) + val (future, testTraceContext) = Tracer.withContext(newContext("future-body")) { + val future = Future(Tracer.currentContext) - (future, TraceContext.currentContext) + (future, Tracer.currentContext) } whenReady(future)(ctxInFuture ⇒ @@ -43,14 +43,14 @@ class FutureInstrumentationSpec extends BaseKamonSpec("future-instrumentation-sp "must be available when executing callbacks on the future" in { - val (future, testTraceContext) = TraceContext.withContext(newContext("future-body")) { + val (future, testTraceContext) = Tracer.withContext(newContext("future-body")) { val future = Future("Hello Kamon!") // The TraceContext is expected to be available during all intermediate processing. .map(_.length) .flatMap(len ⇒ Future(len.toString)) - .map(s ⇒ TraceContext.currentContext) + .map(s ⇒ Tracer.currentContext) - (future, TraceContext.currentContext) + (future, Tracer.currentContext) } whenReady(future)(ctxInFuture ⇒ diff --git a/kamon-scala/src/test/scala/kamon/scalaz/instrumentation/FutureInstrumentationSpec.scala b/kamon-scala/src/test/scala/kamon/scalaz/instrumentation/FutureInstrumentationSpec.scala index ba8fa18c..c533fd62 100644 --- a/kamon-scala/src/test/scala/kamon/scalaz/instrumentation/FutureInstrumentationSpec.scala +++ b/kamon-scala/src/test/scala/kamon/scalaz/instrumentation/FutureInstrumentationSpec.scala @@ -18,7 +18,7 @@ package kamon.scalaz.instrumentation import java.util.concurrent.Executors import kamon.testkit.BaseKamonSpec -import kamon.trace.TraceContext +import kamon.trace.Tracer import org.scalatest.OptionValues import org.scalatest.concurrent.{ PatienceConfiguration, ScalaFutures } @@ -33,10 +33,10 @@ class FutureInstrumentationSpec extends BaseKamonSpec("future-instrumentation-sp "capture the TraceContext available when created" which { "must be available when executing the future's body" in { - val (future, testTraceContext) = TraceContext.withContext(newContext("future-body")) { - val future = Future(TraceContext.currentContext).start + val (future, testTraceContext) = Tracer.withContext(newContext("future-body")) { + val future = Future(Tracer.currentContext).start - (future, TraceContext.currentContext) + (future, Tracer.currentContext) } val ctxInFuture = future.run @@ -45,14 +45,14 @@ class FutureInstrumentationSpec extends BaseKamonSpec("future-instrumentation-sp "must be available when executing callbacks on the future" in { - val (future, testTraceContext) = TraceContext.withContext(newContext("future-body")) { + val (future, testTraceContext) = Tracer.withContext(newContext("future-body")) { val future = Future("Hello Kamon!") // The TraceContext is expected to be available during all intermediate processing. .map(_.length) .flatMap(len ⇒ Future(len.toString)) - .map(s ⇒ TraceContext.currentContext) + .map(s ⇒ Tracer.currentContext) - (future.start, TraceContext.currentContext) + (future.start, Tracer.currentContext) } val ctxInFuture = future.run |