diff options
author | Ivan Topolnak <ivantopo@gmail.com> | 2013-05-24 15:55:54 -0300 |
---|---|---|
committer | Ivan Topolnak <ivantopo@gmail.com> | 2013-05-24 15:55:54 -0300 |
commit | 00bc817f9dcebd1134d42308cf3a5f5ac7ef4185 (patch) | |
tree | d03448d3a5125bd234a823156b310da6aa0c9480 /src/main/scala | |
parent | c9ffaa39ac1cc64e635973f5b7a896a8c528c7bf (diff) | |
download | Kamon-00bc817f9dcebd1134d42308cf3a5f5ac7ef4185.tar.gz Kamon-00bc817f9dcebd1134d42308cf3a5f5ac7ef4185.tar.bz2 Kamon-00bc817f9dcebd1134d42308cf3a5f5ac7ef4185.zip |
Included test for cases in which TraceContext are not available at creation time
Diffstat (limited to 'src/main/scala')
-rw-r--r-- | src/main/scala/kamon/TraceContext.scala | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/src/main/scala/kamon/TraceContext.scala b/src/main/scala/kamon/TraceContext.scala index 5787167b..e3582c60 100644 --- a/src/main/scala/kamon/TraceContext.scala +++ b/src/main/scala/kamon/TraceContext.scala @@ -14,9 +14,9 @@ object TraceContext { override def initialValue(): Option[TraceContext] = None } - def current = context.get + def current = context.get() - def clear = context.remove + def clear = context.remove() def set(ctx: TraceContext) = context.set(Some(ctx)) @@ -27,16 +27,3 @@ trait TraceEntry case class MessageExecutionTime(actorPath: ActorPath, initiated: Long, ended: Long) case class CodeBlockExecutionTime(blockName: String, begin: Long, end: Long) extends TraceEntry - - - - -trait TraceSupport { - def withContext[Out](func: => Any => Out, ctx: TraceContext) = { - TraceContext.set(ctx) - val result = func - TraceContext.clear - - result - } -} |