diff options
author | Ivan Topolnak <ivantopo@gmail.com> | 2013-05-28 17:59:15 -0300 |
---|---|---|
committer | Ivan Topolnak <ivantopo@gmail.com> | 2013-05-28 17:59:15 -0300 |
commit | e9be0b251d5714a5726d7b90c309a293f146c96c (patch) | |
tree | 8166e4b3df9c135a7928ca3d907249d31dcb6c58 /src/main/scala/kamon/instrumentation | |
parent | 00bc817f9dcebd1134d42308cf3a5f5ac7ef4185 (diff) | |
download | Kamon-e9be0b251d5714a5726d7b90c309a293f146c96c.tar.gz Kamon-e9be0b251d5714a5726d7b90c309a293f146c96c.tar.bz2 Kamon-e9be0b251d5714a5726d7b90c309a293f146c96c.zip |
configured sbt to compile aspectj files
Diffstat (limited to 'src/main/scala/kamon/instrumentation')
-rw-r--r-- | src/main/scala/kamon/instrumentation/PromiseCompletingRunnableInstrumentation.scala | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/src/main/scala/kamon/instrumentation/PromiseCompletingRunnableInstrumentation.scala b/src/main/scala/kamon/instrumentation/PromiseCompletingRunnableInstrumentation.scala deleted file mode 100644 index 323951f9..00000000 --- a/src/main/scala/kamon/instrumentation/PromiseCompletingRunnableInstrumentation.scala +++ /dev/null @@ -1,41 +0,0 @@ -package kamon.instrumentation - -import org.aspectj.lang.annotation.{Around, Before, Pointcut, Aspect} -import kamon.TraceContext -import org.aspectj.lang.ProceedingJoinPoint - -@Aspect("perthis(promiseCompletingRunnableCreation())") -class PromiseCompletingRunnableInstrumentation { - - @volatile private var traceContext: Option[TraceContext] = None - - @Pointcut("execution(scala.concurrent.impl.Future.PromiseCompletingRunnable.new(..))") - def promiseCompletingRunnableCreation(): Unit = {} - - @Before("promiseCompletingRunnableCreation()") - def catchTheTraceContext = { - TraceContext.current match { - case Some(ctx) => traceContext = Some(ctx.fork) - case None => traceContext = None - } - } - - - @Pointcut("execution(* scala.concurrent.impl.Future.PromiseCompletingRunnable.run())") - def runnableExecution() = {} - - @Around("runnableExecution()") - def around(pjp: ProceedingJoinPoint) = { - import pjp._ - - traceContext match { - case Some(ctx) => { - TraceContext.set(ctx) - proceed() - TraceContext.clear - } - case None => proceed() - } - } - -} |