diff options
author | Ivan Topolnak <ivantopo@gmail.com> | 2013-08-12 19:00:49 -0300 |
---|---|---|
committer | Ivan Topolnak <ivantopo@gmail.com> | 2013-08-12 19:00:49 -0300 |
commit | 18656c723881ebfd8ade43a990fe73beba5690d0 (patch) | |
tree | 34b563bc5f8913f054df15dad47a8d8e4b5b0e36 /kamon-core/src/main/scala/kamon/executor/eventbus.scala | |
parent | 66957f2632eaccae4e3a354b8787fded8c6369d2 (diff) | |
download | Kamon-18656c723881ebfd8ade43a990fe73beba5690d0.tar.gz Kamon-18656c723881ebfd8ade43a990fe73beba5690d0.tar.bz2 Kamon-18656c723881ebfd8ade43a990fe73beba5690d0.zip |
fixed the instrumentation to work nicely with spray
Diffstat (limited to 'kamon-core/src/main/scala/kamon/executor/eventbus.scala')
-rw-r--r-- | kamon-core/src/main/scala/kamon/executor/eventbus.scala | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/kamon-core/src/main/scala/kamon/executor/eventbus.scala b/kamon-core/src/main/scala/kamon/executor/eventbus.scala index 599f2a7a..33ff4a4e 100644 --- a/kamon-core/src/main/scala/kamon/executor/eventbus.scala +++ b/kamon-core/src/main/scala/kamon/executor/eventbus.scala @@ -5,7 +5,7 @@ import akka.event.LookupClassification import akka.actor._ import java.util.concurrent.TimeUnit -import kamon.{CodeBlockExecutionTime, Kamon, TraceContext} +import kamon.{Tracer, CodeBlockExecutionTime, Kamon, TraceContext} import akka.util.Timeout import scala.util.{Random, Success, Failure} import scala.concurrent.Future @@ -66,14 +66,14 @@ object TryAkka extends App{ } })) - Kamon.start + Tracer.start for(i <- 1 to 4) { val ping = system.actorOf(Props[PingActor]) ping ! Pong() } - def threadPrintln(body: String) = println(s"[${Thread.currentThread().getName}] - [${Kamon.context}] : $body") + def threadPrintln(body: String) = println(s"[${Thread.currentThread().getName}] - [${Tracer.context}] : $body") /* val newRelicReporter = new NewRelicReporter(registry) @@ -86,13 +86,13 @@ object TryAkka extends App{ - Kamon.start + Tracer.start - Kamon.context.get.append(CodeBlockExecutionTime("some-block", System.nanoTime(), System.nanoTime())) + Tracer.context.get.append(CodeBlockExecutionTime("some-block", System.nanoTime(), System.nanoTime())) threadPrintln("Before doing it") val f = Future { threadPrintln("This is happening inside the future body") } - Kamon.stop + Tracer.stop //Thread.sleep(3000) |