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 | c03a0c5dd2a490d4b4ccbde58d18ceccc1867b44 (patch) | |
tree | 4030df619b2035db49f9b10e3c8396199f154904 /kamon-core/src/main/scala/kamon/instrumentation | |
parent | f6805411bbe80544d90736d560322fa6d6bd24e1 (diff) | |
download | Kamon-c03a0c5dd2a490d4b4ccbde58d18ceccc1867b44.tar.gz Kamon-c03a0c5dd2a490d4b4ccbde58d18ceccc1867b44.tar.bz2 Kamon-c03a0c5dd2a490d4b4ccbde58d18ceccc1867b44.zip |
+ core: refactor MDC facilities and closes #100
Diffstat (limited to 'kamon-core/src/main/scala/kamon/instrumentation')
-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() + } } } } |