diff options
Diffstat (limited to 'src/main/scala/kamon/Kamon.scala')
-rw-r--r-- | src/main/scala/kamon/Kamon.scala | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/src/main/scala/kamon/Kamon.scala b/src/main/scala/kamon/Kamon.scala deleted file mode 100644 index ef5f8044..00000000 --- a/src/main/scala/kamon/Kamon.scala +++ /dev/null @@ -1,31 +0,0 @@ -package kamon - -import akka.actor.{Props, ActorSystem} - -object Kamon { - - val ctx = new ThreadLocal[Option[TraceContext]] { - override def initialValue() = None - } - - implicit lazy val actorSystem = ActorSystem("kamon") - - - def context() = ctx.get() - def clear = ctx.remove() - def set(traceContext: TraceContext) = ctx.set(Some(traceContext)) - - def start = set(newTraceContext) - def stop = ctx.get match { - case Some(context) => context.close - case None => - } - - def newTraceContext(): TraceContext = TraceContext() - - - val publisher = actorSystem.actorOf(Props[TransactionPublisher]) - - def publish(tx: FullTransaction) = publisher ! tx - -} |