diff options
author | Ivan Topolnjak <ivantopo@gmail.com> | 2013-11-23 21:58:28 -0300 |
---|---|---|
committer | Ivan Topolnjak <ivantopo@gmail.com> | 2013-11-23 21:58:28 -0300 |
commit | ddb000a4510dfce20f7090ac92ea9144403addd6 (patch) | |
tree | 3e249637e4282dfa6ebc06b03e96405e0d0bd93e /kamon-trace/src/main/scala/kamon | |
parent | f9b596754feb657f1130eebd0cc4ac2a5e741518 (diff) | |
download | Kamon-ddb000a4510dfce20f7090ac92ea9144403addd6.tar.gz Kamon-ddb000a4510dfce20f7090ac92ea9144403addd6.tar.bz2 Kamon-ddb000a4510dfce20f7090ac92ea9144403addd6.zip |
Change withValue to withContext, seems more explicit
Diffstat (limited to 'kamon-trace/src/main/scala/kamon')
3 files changed, 3 insertions, 3 deletions
diff --git a/kamon-trace/src/main/scala/kamon/trace/Trace.scala b/kamon-trace/src/main/scala/kamon/trace/Trace.scala index fbd4ea8b..ac380cd1 100644 --- a/kamon-trace/src/main/scala/kamon/trace/Trace.scala +++ b/kamon-trace/src/main/scala/kamon/trace/Trace.scala @@ -35,7 +35,7 @@ object Trace extends ExtensionId[TraceExtension] with ExtensionIdProvider { ctx } - def withValue[T](ctx: Option[TraceContext])(thunk: => T): T = traceContext.withValue(ctx)(thunk) + def withContext[T](ctx: Option[TraceContext])(thunk: => T): T = traceContext.withValue(ctx)(thunk) def transformContext(f: TraceContext => TraceContext): Unit = { context.map(f).foreach(set(_)) diff --git a/kamon-trace/src/main/scala/kamon/trace/instrumentation/ActorMessagePassingTracing.scala b/kamon-trace/src/main/scala/kamon/trace/instrumentation/ActorMessagePassingTracing.scala index 9eb0a7f9..7c7c8b12 100644 --- a/kamon-trace/src/main/scala/kamon/trace/instrumentation/ActorMessagePassingTracing.scala +++ b/kamon-trace/src/main/scala/kamon/trace/instrumentation/ActorMessagePassingTracing.scala @@ -22,7 +22,7 @@ class BehaviourInvokeTracing { //safe cast val ctxInMessage = envelope.asInstanceOf[ContextAware].traceContext - Trace.withValue(ctxInMessage) { + Trace.withContext(ctxInMessage) { pjp.proceed() } } diff --git a/kamon-trace/src/main/scala/kamon/trace/instrumentation/FutureTracing.scala b/kamon-trace/src/main/scala/kamon/trace/instrumentation/FutureTracing.scala index 10daa2da..fe32a04c 100644 --- a/kamon-trace/src/main/scala/kamon/trace/instrumentation/FutureTracing.scala +++ b/kamon-trace/src/main/scala/kamon/trace/instrumentation/FutureTracing.scala @@ -32,7 +32,7 @@ class FutureTracing { def around(pjp: ProceedingJoinPoint, runnable: ContextAware): Any = { import pjp._ - Trace.withValue(runnable.traceContext) { + Trace.withContext(runnable.traceContext) { proceed() } } |