diff options
Diffstat (limited to 'kamon-spray/src')
-rw-r--r-- | kamon-spray/src/main/scala/spray/can/server/ServerRequestTracing.scala | 14 |
1 files changed, 13 insertions, 1 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 c43022d9..91dba87b 100644 --- a/kamon-spray/src/main/scala/spray/can/server/ServerRequestTracing.scala +++ b/kamon-spray/src/main/scala/spray/can/server/ServerRequestTracing.scala @@ -15,11 +15,15 @@ * ========================================================== */ package spray.can.server -import org.aspectj.lang.annotation.{ After, Pointcut, DeclareMixin, Aspect } +import org.aspectj.lang.annotation._ import kamon.trace.{ Trace, ContextAware } import spray.http.HttpRequest import akka.actor.ActorSystem import akka.event.Logging.Warning +import org.aspectj.lang.ProceedingJoinPoint +import spray.http.HttpRequest +import akka.event.Logging.Warning +import scala.Some @Aspect class ServerRequestTracing { @@ -41,6 +45,14 @@ class ServerRequestTracing { openRequest.traceContext } + @Pointcut("execution(* spray.can.server.ServerFrontend$$anon$2$$anon$1.spray$can$server$ServerFrontend$$anon$$anon$$openNewRequest(..))") + def openNewRequest(): Unit = {} + + @After("openNewRequest()") + def afterOpenNewRequest(): Unit = { + Trace.clear + } + @Pointcut("execution(* spray.can.server.OpenRequestComponent$DefaultOpenRequest.handleResponseEndAndReturnNextOpenRequest(..)) && target(openRequest)") def openRequestCreation(openRequest: ContextAware): Unit = {} |