diff options
author | Ivan Topolnjak <ivantopo@gmail.com> | 2013-11-23 21:30:34 -0300 |
---|---|---|
committer | Ivan Topolnjak <ivantopo@gmail.com> | 2013-11-23 21:30:34 -0300 |
commit | 6ba7487204e0339437c7279e6330fc03419a2c5c (patch) | |
tree | eda414d575a20d4000d04f3f06207b6843919ca7 /kamon-trace/src/main/scala/kamon/trace/Trace.scala | |
parent | 741ac431e7b156c782f5f02a29a17686912cb590 (diff) | |
download | Kamon-6ba7487204e0339437c7279e6330fc03419a2c5c.tar.gz Kamon-6ba7487204e0339437c7279e6330fc03419a2c5c.tar.bz2 Kamon-6ba7487204e0339437c7279e6330fc03419a2c5c.zip |
Put FutureTracing instrumentation in place, simpler and more explicit test
Diffstat (limited to 'kamon-trace/src/main/scala/kamon/trace/Trace.scala')
-rw-r--r-- | kamon-trace/src/main/scala/kamon/trace/Trace.scala | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/kamon-trace/src/main/scala/kamon/trace/Trace.scala b/kamon-trace/src/main/scala/kamon/trace/Trace.scala index 0ef438d4..fbd4ea8b 100644 --- a/kamon-trace/src/main/scala/kamon/trace/Trace.scala +++ b/kamon-trace/src/main/scala/kamon/trace/Trace.scala @@ -35,6 +35,8 @@ object Trace extends ExtensionId[TraceExtension] with ExtensionIdProvider { ctx } + def withValue[T](ctx: Option[TraceContext])(thunk: => T): T = traceContext.withValue(ctx)(thunk) + def transformContext(f: TraceContext => TraceContext): Unit = { context.map(f).foreach(set(_)) } |