diff options
author | Ivan Topolnjak <ivantopo@gmail.com> | 2016-03-14 21:59:02 +0100 |
---|---|---|
committer | Ivan Topolnjak <ivantopo@gmail.com> | 2016-03-14 21:59:02 +0100 |
commit | 3566482d061248ff01882fa9647ae2d65677d5ed (patch) | |
tree | 60746d0545a5c72fbf7ded521b9f463244e96417 /kamon-akka/src/test/scala/kamon/akka/instrumentation/ActorCellInstrumentationSpec.scala | |
parent | 8b20cf6440e032750e574d8a6da13084541c1500 (diff) | |
download | Kamon-3566482d061248ff01882fa9647ae2d65677d5ed.tar.gz Kamon-3566482d061248ff01882fa9647ae2d65677d5ed.tar.bz2 Kamon-3566482d061248ff01882fa9647ae2d65677d5ed.zip |
introduce selective instrumentation for akka actors.
Diffstat (limited to 'kamon-akka/src/test/scala/kamon/akka/instrumentation/ActorCellInstrumentationSpec.scala')
-rw-r--r-- | kamon-akka/src/test/scala/kamon/akka/instrumentation/ActorCellInstrumentationSpec.scala | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/kamon-akka/src/test/scala/kamon/akka/instrumentation/ActorCellInstrumentationSpec.scala b/kamon-akka/src/test/scala/kamon/akka/instrumentation/ActorCellInstrumentationSpec.scala index 457b8351..40e82011 100644 --- a/kamon-akka/src/test/scala/kamon/akka/instrumentation/ActorCellInstrumentationSpec.scala +++ b/kamon-akka/src/test/scala/kamon/akka/instrumentation/ActorCellInstrumentationSpec.scala @@ -38,12 +38,16 @@ class ActorCellInstrumentationSpec extends BaseKamonSpec("actor-cell-instrumenta } "propagate the TraceContext using tell" in new EchoActorFixture { - val testTraceContext = Tracer.withContext(newContext("tell-reply")) { - ctxEchoActor.tell("test", testActor) - Tracer.currentContext + for (i ← 1 to 10000) { + val ta = system.actorOf(Props[TraceContextEcho]) + val testTraceContext = Tracer.withContext(newContext("tell-reply", i.toString)) { + ta.tell("test", testActor) + Tracer.currentContext + } + + expectMsg(testTraceContext) + system.stop(ta) } - - expectMsg(testTraceContext) } "propagate the TraceContext using ask" in new EchoActorFixture { @@ -116,7 +120,8 @@ class ActorCellInstrumentationSpec extends BaseKamonSpec("actor-cell-instrumenta class TraceContextEcho extends Actor { def receive = { - case msg: String ⇒ sender ! Tracer.currentContext + case msg: String ⇒ + sender ! Tracer.currentContext } } |