diff options
Diffstat (limited to 'kamon-spray')
-rw-r--r-- | kamon-spray/src/main/scala/spray/can/server/ServerRequestTracing.scala | 2 | ||||
-rw-r--r-- | kamon-spray/src/test/scala/kamon/ServerRequestTracingSpec.scala | 14 |
2 files changed, 9 insertions, 7 deletions
diff --git a/kamon-spray/src/main/scala/spray/can/server/ServerRequestTracing.scala b/kamon-spray/src/main/scala/spray/can/server/ServerRequestTracing.scala index 8055cf6b..cd7cae93 100644 --- a/kamon-spray/src/main/scala/spray/can/server/ServerRequestTracing.scala +++ b/kamon-spray/src/main/scala/spray/can/server/ServerRequestTracing.scala @@ -1,7 +1,7 @@ package spray.can.server import org.aspectj.lang.annotation.{After, Pointcut, DeclareMixin, Aspect} -import kamon.trace.{Trace, TraceContext, ContextAware} +import kamon.trace.{Trace, ContextAware} import spray.http.HttpRequest import akka.actor.ActorSystem import akka.event.Logging.Warning diff --git a/kamon-spray/src/test/scala/kamon/ServerRequestTracingSpec.scala b/kamon-spray/src/test/scala/kamon/ServerRequestTracingSpec.scala index d789042e..648c2f3d 100644 --- a/kamon-spray/src/test/scala/kamon/ServerRequestTracingSpec.scala +++ b/kamon-spray/src/test/scala/kamon/ServerRequestTracingSpec.scala @@ -33,7 +33,8 @@ class ServerRequestTracingSpec extends TestKit(ActorSystem("server-request-traci } within(5 seconds) { - val traceId = expectMsgPF() { case Start(id, _) => id} + val traceId = expectMsgPF() { case Start(id, _) => id } + println("Expecting for trace: " + traceId) expectMsgPF() { case Finish(traceId) => } } } @@ -65,12 +66,13 @@ trait TestServer extends SimpleRoutingApp { path("ok") { complete("ok") } ~ - path("clearcontext"){ - complete { - Trace.clear - "ok" - } + path("clearcontext"){ + complete { + println("The Context in the route is: " + Trace.context) + Trace.clear + "ok" } + } } ), timeout.duration).localAddress.getPort |