aboutsummaryrefslogtreecommitdiff
path: root/kamon-core/src/main/scala/kamon/instrumentation/ActorRefTellInstrumentation.scala
diff options
context:
space:
mode:
authorIvan Topolnak <ivantopo@gmail.com>2013-09-30 11:21:25 -0300
committerIvan Topolnak <ivantopo@gmail.com>2013-09-30 11:21:25 -0300
commitd7f1e195da11f977d5fdbf74598e499156de8dc4 (patch)
tree58b6650bcc01c38f0cfb6fb32bbf4921d4c4b79f /kamon-core/src/main/scala/kamon/instrumentation/ActorRefTellInstrumentation.scala
parent604d5801332838f8bea25fe25cb8df5dbb82af08 (diff)
downloadKamon-d7f1e195da11f977d5fdbf74598e499156de8dc4.tar.gz
Kamon-d7f1e195da11f977d5fdbf74598e499156de8dc4.tar.bz2
Kamon-d7f1e195da11f977d5fdbf74598e499156de8dc4.zip
wip
Diffstat (limited to 'kamon-core/src/main/scala/kamon/instrumentation/ActorRefTellInstrumentation.scala')
-rw-r--r--kamon-core/src/main/scala/kamon/instrumentation/ActorRefTellInstrumentation.scala14
1 files changed, 11 insertions, 3 deletions
diff --git a/kamon-core/src/main/scala/kamon/instrumentation/ActorRefTellInstrumentation.scala b/kamon-core/src/main/scala/kamon/instrumentation/ActorRefTellInstrumentation.scala
index d92d7f6c..df124f41 100644
--- a/kamon-core/src/main/scala/kamon/instrumentation/ActorRefTellInstrumentation.scala
+++ b/kamon-core/src/main/scala/kamon/instrumentation/ActorRefTellInstrumentation.scala
@@ -64,8 +64,11 @@ class ActorCellInvokeInstrumentation {
Tracer.clear
//MDC.remove("uow")
}
- case None => pjp.proceedWith(originalEnvelope)
+ case None =>
+ assert(Tracer.context() == None)
+ pjp.proceedWith(originalEnvelope)
}
+ Tracer.clear
}
}
@@ -79,6 +82,7 @@ class UnregisteredActorRefInstrumentation {
def sprayInvokeAround(pjp: ProceedingJoinPoint, message: Any, sender: ActorRef): Unit = {
import ProceedingJoinPointPimp._
//println("Handling unregistered actor ref message: "+message)
+
message match {
case SimpleTraceMessage(msg, ctx) => {
ctx match {
@@ -87,10 +91,14 @@ class UnregisteredActorRefInstrumentation {
pjp.proceedWith(msg.asInstanceOf[AnyRef]) // TODO: define if we should use Any or AnyRef and unify with the rest of the instrumentation.
Tracer.clear
}
- case None => pjp.proceedWith(msg.asInstanceOf[AnyRef])
+ case None =>
+ assert(Tracer.context() == None)
+ pjp.proceedWith(msg.asInstanceOf[AnyRef])
}
}
- case _ => pjp.proceed
+ case _ =>
+ //assert(Tracer.context() == None)
+ pjp.proceed
}
}
}