diff options
Diffstat (limited to 'kamon-play/src/main/scala/kamon')
-rw-r--r-- | kamon-play/src/main/scala/kamon/play/instrumentation/RequestInstrumentation.scala | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/kamon-play/src/main/scala/kamon/play/instrumentation/RequestInstrumentation.scala b/kamon-play/src/main/scala/kamon/play/instrumentation/RequestInstrumentation.scala index 18060895..43a53cf2 100644 --- a/kamon-play/src/main/scala/kamon/play/instrumentation/RequestInstrumentation.scala +++ b/kamon-play/src/main/scala/kamon/play/instrumentation/RequestInstrumentation.scala @@ -53,16 +53,13 @@ class RequestInstrumentation { def onError(request: TraceContextAware, ex: Throwable): Unit = {} @Around("onError(request, ex)") - def aroundOnError(pjp: ProceedingJoinPoint, request: TraceContextAware, ex: Throwable): Any = { - val simpleResult = request.traceContext match { - case None ⇒ pjp.proceed() - case Some(ctx) ⇒ { - val actorSystem = ctx.system - Kamon(Play)(actorSystem).publishErrorMessage(actorSystem, ex.getMessage, ex) - pjp.proceed() - } + def aroundOnError(pjp: ProceedingJoinPoint, request: TraceContextAware, ex: Throwable): Any = request.traceContext match { + case None ⇒ pjp.proceed() + case Some(ctx) ⇒ { + val actorSystem = ctx.system + Kamon(Play)(actorSystem).publishErrorMessage(actorSystem, ex.getMessage, ex) + pjp.proceed() } - simpleResult } private[this] val kamonRequestFilter = Filter { (nextFilter, requestHeader) ⇒ |