diff options
author | Ivan Topolnak <ivantopo@gmail.com> | 2013-06-06 18:03:20 -0300 |
---|---|---|
committer | Ivan Topolnak <ivantopo@gmail.com> | 2013-06-06 18:03:20 -0300 |
commit | 197746563e47783ed4b5f43e94c9aa63734081f6 (patch) | |
tree | c233afe3560a1f3cdaf33f6edcbd23b3a196b5f1 /src/main/scala/kamon/Kamon.scala | |
parent | 695b9b6d2bdf55afd7fe420d9a6fc36d3d45ed31 (diff) | |
download | Kamon-197746563e47783ed4b5f43e94c9aa63734081f6.tar.gz Kamon-197746563e47783ed4b5f43e94c9aa63734081f6.tar.bz2 Kamon-197746563e47783ed4b5f43e94c9aa63734081f6.zip |
wip
Diffstat (limited to 'src/main/scala/kamon/Kamon.scala')
-rw-r--r-- | src/main/scala/kamon/Kamon.scala | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/main/scala/kamon/Kamon.scala b/src/main/scala/kamon/Kamon.scala index ef5f8044..c1b97722 100644 --- a/src/main/scala/kamon/Kamon.scala +++ b/src/main/scala/kamon/Kamon.scala @@ -29,3 +29,24 @@ object Kamon { def publish(tx: FullTransaction) = publisher ! tx } + + + +object Tracer { + val ctx = new ThreadLocal[Option[TraceContext]] { + override def initialValue() = None + } + + 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() + +} |