diff options
author | Diego <diegolparra@gmail.com> | 2015-05-21 16:59:37 -0300 |
---|---|---|
committer | Diego <diegolparra@gmail.com> | 2015-05-21 16:59:37 -0300 |
commit | 58919a59acd867bc919cbbb24d13613f666f9add (patch) | |
tree | e6383f1130245a7e7da867755c762554d69fe1f0 /kamon-play/src/main/scala/kamon/play/instrumentation/WSInstrumentation.scala | |
parent | f47cc5d6ff8e08599156c731db8a8335f6df3ada (diff) | |
download | Kamon-58919a59acd867bc919cbbb24d13613f666f9add.tar.gz Kamon-58919a59acd867bc919cbbb24d13613f666f9add.tar.bz2 Kamon-58919a59acd867bc919cbbb24d13613f666f9add.zip |
! play: change use onComplete instead of map in order to avoid open segments in a failure
Diffstat (limited to 'kamon-play/src/main/scala/kamon/play/instrumentation/WSInstrumentation.scala')
-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() } |