diff options
author | Ivan Topolnjak <ivantopo@gmail.com> | 2015-04-17 19:11:41 +0200 |
---|---|---|
committer | Ivan Topolnjak <ivantopo@gmail.com> | 2015-04-17 19:11:41 +0200 |
commit | eb07f2f0b583c759e9cfaba27e3bcddeaf05a4cf (patch) | |
tree | 57784857799de642dcd76be931027cf04cb56f67 /kamon-spray/src/main/scala/kamon/spray | |
parent | 2731db2910827f0bf22484d0e5603788795b69f9 (diff) | |
download | Kamon-eb07f2f0b583c759e9cfaba27e3bcddeaf05a4cf.tar.gz Kamon-eb07f2f0b583c759e9cfaba27e3bcddeaf05a4cf.tar.bz2 Kamon-eb07f2f0b583c759e9cfaba27e3bcddeaf05a4cf.zip |
= core: add commodity trace context manipulation methods to the Tracer.
Diffstat (limited to 'kamon-spray/src/main/scala/kamon/spray')
-rw-r--r-- | kamon-spray/src/main/scala/kamon/spray/instrumentation/ServerRequestInstrumentation.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kamon-spray/src/main/scala/kamon/spray/instrumentation/ServerRequestInstrumentation.scala b/kamon-spray/src/main/scala/kamon/spray/instrumentation/ServerRequestInstrumentation.scala index 5be156cd..d76b9f58 100644 --- a/kamon-spray/src/main/scala/kamon/spray/instrumentation/ServerRequestInstrumentation.scala +++ b/kamon-spray/src/main/scala/kamon/spray/instrumentation/ServerRequestInstrumentation.scala @@ -46,7 +46,7 @@ class ServerRequestInstrumentation { request.headers.find(_.name == sprayExtension.settings.traceTokenHeaderName).map(_.value) } else None - val newContext = token.map(customToken ⇒ tracer.newContext(defaultTraceName, customToken)) getOrElse (tracer.newContext(defaultTraceName)) + val newContext = tracer.newContext(defaultTraceName, token) Tracer.setCurrentContext(newContext) // Necessary to force initialization of traceContext when initiating the request. |