diff options
Diffstat (limited to 'kamon-spray/src/main')
-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. |