diff options
author | Diego <diegolparra@gmail.com> | 2014-03-09 16:40:23 -0300 |
---|---|---|
committer | Diego <diegolparra@gmail.com> | 2014-03-09 16:40:23 -0300 |
commit | 45a0dfe40b92d938bbdb5ce8205a76e0d2df5779 (patch) | |
tree | 01d7b59d207ff57a741e233f0e7b00de1c889bfc /kamon-play/src/main/scala/kamon/play | |
parent | 04550ce1daff2b3d13aa85931686a303bf93fbd8 (diff) | |
download | Kamon-45a0dfe40b92d938bbdb5ce8205a76e0d2df5779.tar.gz Kamon-45a0dfe40b92d938bbdb5ce8205a76e0d2df5779.tar.bz2 Kamon-45a0dfe40b92d938bbdb5ce8205a76e0d2df5779.zip |
some cleanup
Diffstat (limited to 'kamon-play/src/main/scala/kamon/play')
-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) ⇒ |