diff options
author | Diego <diegolparra@gmail.com> | 2014-11-19 22:09:41 -0300 |
---|---|---|
committer | Diego <diegolparra@gmail.com> | 2014-11-19 22:09:41 -0300 |
commit | 827644d92a216172cd587f253c1fc1a0bbdb5eaf (patch) | |
tree | 52883845f601cca03f5e299be536b4d9b013b48a /kamon-core/src/main/scala/kamon/instrumentation/akka/ActorLoggingInstrumentation.scala | |
parent | d990039c7e0a3b6a909f93dc477fc7aaf4907e42 (diff) | |
download | Kamon-827644d92a216172cd587f253c1fc1a0bbdb5eaf.tar.gz Kamon-827644d92a216172cd587f253c1fc1a0bbdb5eaf.tar.bz2 Kamon-827644d92a216172cd587f253c1fc1a0bbdb5eaf.zip |
+ core: refactor MDC facilities and closes #100
Diffstat (limited to 'kamon-core/src/main/scala/kamon/instrumentation/akka/ActorLoggingInstrumentation.scala')
-rw-r--r-- | kamon-core/src/main/scala/kamon/instrumentation/akka/ActorLoggingInstrumentation.scala | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/kamon-core/src/main/scala/kamon/instrumentation/akka/ActorLoggingInstrumentation.scala b/kamon-core/src/main/scala/kamon/instrumentation/akka/ActorLoggingInstrumentation.scala index 6b90a81e..e0e5d316 100644 --- a/kamon-core/src/main/scala/kamon/instrumentation/akka/ActorLoggingInstrumentation.scala +++ b/kamon-core/src/main/scala/kamon/instrumentation/akka/ActorLoggingInstrumentation.scala @@ -16,12 +16,13 @@ package akka.kamon.instrumentation +import kamon.trace.logging.MdcKeysSupport import kamon.trace.{ TraceContextAware, TraceRecorder } import org.aspectj.lang.ProceedingJoinPoint import org.aspectj.lang.annotation._ @Aspect -class ActorLoggingInstrumentation { +class ActorLoggingInstrumentation extends MdcKeysSupport { @DeclareMixin("akka.event.Logging.LogEvent+") def mixinTraceContextAwareToLogEvent: TraceContextAware = TraceContextAware.default @@ -41,7 +42,9 @@ class ActorLoggingInstrumentation { @Around("withMdcInvocation(logSource, logEvent, logStatement)") def aroundWithMdcInvocation(pjp: ProceedingJoinPoint, logSource: String, logEvent: TraceContextAware, logStatement: () ⇒ _): Unit = { TraceRecorder.withInlineTraceContextReplacement(logEvent.traceContext) { - pjp.proceed() + withMdc { + pjp.proceed() + } } } } |