diff options
author | Diego <diegolparra@gmail.com> | 2014-11-30 17:24:37 -0300 |
---|---|---|
committer | Diego <diegolparra@gmail.com> | 2014-11-30 17:24:37 -0300 |
commit | adb02b6323d65c178ce8bd095bc9807384b5a7f8 (patch) | |
tree | e96b16bbc57731e2f28fe2bc09c0792bf09bce6e /kamon-core/src/main | |
parent | 85e2769f1302dc2df689752c1b9613d3521df0a4 (diff) | |
download | Kamon-adb02b6323d65c178ce8bd095bc9807384b5a7f8.tar.gz Kamon-adb02b6323d65c178ce8bd095bc9807384b5a7f8.tar.bz2 Kamon-adb02b6323d65c178ce8bd095bc9807384b5a7f8.zip |
+ play, spray, newrelic: store in TraceLocal useful data to diagnose errors and closes #6
Diffstat (limited to 'kamon-core/src/main')
-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. |