diff options
author | Ivan Topolnak <ivantopo@gmail.com> | 2013-05-24 15:28:38 -0300 |
---|---|---|
committer | Ivan Topolnak <ivantopo@gmail.com> | 2013-05-24 15:28:38 -0300 |
commit | c9ffaa39ac1cc64e635973f5b7a896a8c528c7bf (patch) | |
tree | 025f21614a0d2a437e7103d49c38b3b9b46ff72a /src/main/scala | |
parent | 1b2bc32d62e5955fae291ed7daaa57b48c0de48e (diff) | |
parent | 8d17e06079ac26b1d5154121accf5bb932e49f45 (diff) | |
download | Kamon-c9ffaa39ac1cc64e635973f5b7a896a8c528c7bf.tar.gz Kamon-c9ffaa39ac1cc64e635973f5b7a896a8c528c7bf.tar.bz2 Kamon-c9ffaa39ac1cc64e635973f5b7a896a8c528c7bf.zip |
Merge branch 'master' of github.com:dpsoft/Kamon
Diffstat (limited to 'src/main/scala')
-rw-r--r-- | src/main/scala/kamon/instrumentation/PromiseInstrumentation.scala | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/src/main/scala/kamon/instrumentation/PromiseInstrumentation.scala b/src/main/scala/kamon/instrumentation/PromiseInstrumentation.scala index f1aec404..a39bc4ad 100644 --- a/src/main/scala/kamon/instrumentation/PromiseInstrumentation.scala +++ b/src/main/scala/kamon/instrumentation/PromiseInstrumentation.scala @@ -44,28 +44,4 @@ class PromiseInstrumentation { proceed(getArgs.updated(0, wrappedFunction)) } - @Pointcut("execution(* scala.concurrent.impl.Future$.apply(..)) && args(body, executor)") - def registeringApplyOnFuture(body: () => Any, executor: ExecutionContext) = {} - - @Around("registeringApplyOnFuture(body, executor)") - def aroundApplyOnFuture(pjp:ProceedingJoinPoint, body: () => Any, executor: ExecutionContext) = { - import pjp._ - - val wrappedBody = wrapFutureBody(traceContext)(body) - proceed(getArgs.updated(0, wrappedBody)) - } - - def wrapFutureBody[A](ctx:Option[TraceContext])(block: => A) : A = { - ctx match { - case Some(ctx) => { - println("Wrapping body") - TraceContext.set(ctx) - val result = block - TraceContext.clear - result - } - case None => block - } - } - } |