diff options
Diffstat (limited to 'kamon-core/src/main/scala')
-rw-r--r-- | kamon-core/src/main/scala/kamon/trace/TraceLocal.scala | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/kamon-core/src/main/scala/kamon/trace/TraceLocal.scala b/kamon-core/src/main/scala/kamon/trace/TraceLocal.scala index a7296c31..c5fb100c 100644 --- a/kamon-core/src/main/scala/kamon/trace/TraceLocal.scala +++ b/kamon-core/src/main/scala/kamon/trace/TraceLocal.scala @@ -38,6 +38,10 @@ object TraceLocal { def apply(mdcKey: String): AvailableToMdc = fromKey(mdcKey) } + case class HttpContext(agent: String, uri: String, xforwarded: String) + + object HttpContextKey extends TraceLocal.TraceLocalKey { type ValueType = HttpContext } + def store(key: TraceLocalKey)(value: key.ValueType): Unit = TraceRecorder.currentContext match { case ctx: DefaultTraceContext ⇒ ctx.traceLocalStorage.store(key)(value) case EmptyTraceContext ⇒ // Can't store in the empty context. |