diff options
author | Diego <diegolparra@gmail.com> | 2015-08-16 11:33:12 -0300 |
---|---|---|
committer | Diego <diegolparra@gmail.com> | 2015-08-16 11:33:12 -0300 |
commit | c223b5a334037c5ff3d5db026e6178a92706cdb4 (patch) | |
tree | 6da99e470bb572413d927c1833aa0f9086114c90 /kamon-play-2.3.x/src/main/scala/kamon/play/instrumentation/RequestInstrumentation.scala | |
parent | 863fe5d26cb81f92dd009ff87e7944462dadafd8 (diff) | |
download | Kamon-c223b5a334037c5ff3d5db026e6178a92706cdb4.tar.gz Kamon-c223b5a334037c5ff3d5db026e6178a92706cdb4.tar.bz2 Kamon-c223b5a334037c5ff3d5db026e6178a92706cdb4.zip |
! play: remove diagnostic context data
Diffstat (limited to 'kamon-play-2.3.x/src/main/scala/kamon/play/instrumentation/RequestInstrumentation.scala')
-rw-r--r-- | kamon-play-2.3.x/src/main/scala/kamon/play/instrumentation/RequestInstrumentation.scala | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/kamon-play-2.3.x/src/main/scala/kamon/play/instrumentation/RequestInstrumentation.scala b/kamon-play-2.3.x/src/main/scala/kamon/play/instrumentation/RequestInstrumentation.scala index 7dcb7913..c8a808ec 100644 --- a/kamon-play-2.3.x/src/main/scala/kamon/play/instrumentation/RequestInstrumentation.scala +++ b/kamon-play-2.3.x/src/main/scala/kamon/play/instrumentation/RequestInstrumentation.scala @@ -17,7 +17,6 @@ package kamon.play.instrumentation import kamon.Kamon import kamon.play.Play -import kamon.trace.TraceLocal.{ HttpContext, HttpContextKey } import kamon.trace._ import kamon.util.SameThreadExecutionContext import org.aspectj.lang.ProceedingJoinPoint @@ -28,8 +27,6 @@ import play.api.mvc._ @Aspect class RequestInstrumentation { - import RequestInstrumentation._ - @DeclareMixin("play.api.mvc.RequestHeader+") def mixinContextAwareNewRequest: TraceContextAware = TraceContextAware.default @@ -63,16 +60,11 @@ class RequestInstrumentation { } getOrElse result } - //store in TraceLocal useful data to diagnose errors - storeDiagnosticData(requestHeader) - //override the current trace name Tracer.currentContext.rename(playExtension.generateTraceName(requestHeader)) - // Invoke the action next(requestHeader).map(onResult)(SameThreadExecutionContext) } - pjp.proceed(Array(EssentialAction(essentialAction))) } @@ -85,17 +77,4 @@ class RequestInstrumentation { def recordHttpServerMetrics(header: ResponseHeader, traceName: String): Unit = Kamon(Play).httpServerMetrics.recordResponse(traceName, header.status.toString) - - def storeDiagnosticData(request: RequestHeader): Unit = { - val agent = request.headers.get(UserAgent).getOrElse(Unknown) - val forwarded = request.headers.get(XForwardedFor).getOrElse(Unknown) - - TraceLocal.store(HttpContextKey)(HttpContext(agent, request.uri, forwarded)) - } -} - -object RequestInstrumentation { - val UserAgent = "User-Agent" - val XForwardedFor = "X-Forwarded-For" - val Unknown = "unknown" } |