diff options
-rw-r--r-- | kamon-play/src/main/scala/kamon/play/instrumentation/WSInstrumentation.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kamon-play/src/main/scala/kamon/play/instrumentation/WSInstrumentation.scala b/kamon-play/src/main/scala/kamon/play/instrumentation/WSInstrumentation.scala index 3a7c9563..66c933f6 100644 --- a/kamon-play/src/main/scala/kamon/play/instrumentation/WSInstrumentation.scala +++ b/kamon-play/src/main/scala/kamon/play/instrumentation/WSInstrumentation.scala @@ -39,7 +39,7 @@ class WSInstrumentation { val segment = ctx.startSegment(segmentName, SegmentCategory.HttpClient, Play.SegmentLibraryName) val response = pjp.proceed().asInstanceOf[Future[WSResponse]] - response.map(result ⇒ segment.finish())(SameThreadExecutionContext) + response.onComplete(result ⇒ segment.finish())(SameThreadExecutionContext) response } getOrElse pjp.proceed() } |