diff options
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | src/main/scala/kamon/Kamon.scala | 5 |
2 files changed, 4 insertions, 2 deletions
@@ -1,5 +1,6 @@ *.class *.log +.history # sbt specific dist/* diff --git a/src/main/scala/kamon/Kamon.scala b/src/main/scala/kamon/Kamon.scala index 4cba2342..ef5f8044 100644 --- a/src/main/scala/kamon/Kamon.scala +++ b/src/main/scala/kamon/Kamon.scala @@ -4,11 +4,12 @@ import akka.actor.{Props, ActorSystem} object Kamon { - implicit val actorSystem = ActorSystem("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() |