diff options
author | Ivan Topolnjak <ivantopo@gmail.com> | 2014-10-23 20:15:56 +0200 |
---|---|---|
committer | Ivan Topolnjak <ivantopo@gmail.com> | 2014-10-23 20:15:56 +0200 |
commit | 81ae33c18c7d875240db1b2bbf8fcb2d6e41ca47 (patch) | |
tree | 35e66d4e5d3da4f28fb32bf75cf65f201d3b9502 /kamon-core/src/main/scala/kamon/instrumentation | |
parent | 349b628dc483c7ec6ba4c166e25a5965c0e7d81c (diff) | |
download | Kamon-81ae33c18c7d875240db1b2bbf8fcb2d6e41ca47.tar.gz Kamon-81ae33c18c7d875240db1b2bbf8fcb2d6e41ca47.tar.bz2 Kamon-81ae33c18c7d875240db1b2bbf8fcb2d6e41ca47.zip |
= core: minor cleanup of the remoting instrumentation
Diffstat (limited to 'kamon-core/src/main/scala/kamon/instrumentation')
-rw-r--r-- | kamon-core/src/main/scala/kamon/instrumentation/akka/RemotingInstrumentation.scala | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/kamon-core/src/main/scala/kamon/instrumentation/akka/RemotingInstrumentation.scala b/kamon-core/src/main/scala/kamon/instrumentation/akka/RemotingInstrumentation.scala index 341b0ee7..00747935 100644 --- a/kamon-core/src/main/scala/kamon/instrumentation/akka/RemotingInstrumentation.scala +++ b/kamon-core/src/main/scala/kamon/instrumentation/akka/RemotingInstrumentation.scala @@ -1,20 +1,19 @@ package akka.remote.instrumentation import akka.actor.{ ActorRef, Address } -import akka.dispatch.sysmsg.SystemMessage import akka.remote.instrumentation.TraceContextAwareWireFormats.{ TraceContextAwareRemoteEnvelope, RemoteTraceContext, AckAndTraceContextAwareEnvelopeContainer } -import akka.remote.transport.AkkaPduCodec.Message import akka.remote.{ RemoteActorRefProvider, Ack, SeqNo } import akka.remote.WireFormats._ import akka.util.ByteString -import kamon.trace.{ TraceContextAware, TraceRecorder } +import kamon.trace.TraceRecorder import org.aspectj.lang.ProceedingJoinPoint import org.aspectj.lang.annotation._ @Aspect class RemotingInstrumentation { - @Pointcut("execution(* akka.remote.transport.AkkaPduProtobufCodec$.constructMessage(..)) && args(localAddress, recipient, serializedMessage, senderOption, seqOption, ackOption)") + @Pointcut("execution(* akka.remote.transport.AkkaPduProtobufCodec$.constructMessage(..)) && " + + "args(localAddress, recipient, serializedMessage, senderOption, seqOption, ackOption)") def constructAkkaPduMessage(localAddress: Address, recipient: ActorRef, serializedMessage: SerializedMessage, senderOption: Option[ActorRef], seqOption: Option[SeqNo], ackOption: Option[Ack]): Unit = {} @@ -56,7 +55,8 @@ class RemotingInstrumentation { // Copied from akka.remote.transport.AkkaPduProtobufCodec because of private access. private def serializeActorRef(defaultAddress: Address, ref: ActorRef): ActorRefData = { ActorRefData.newBuilder.setPath( - if (ref.path.address.host.isDefined) ref.path.toSerializationFormat else ref.path.toSerializationFormatWithAddress(defaultAddress)).build() + if (ref.path.address.host.isDefined) ref.path.toSerializationFormat + else ref.path.toSerializationFormatWithAddress(defaultAddress)).build() } // Copied from akka.remote.transport.AkkaPduProtobufCodec because of private access. @@ -71,8 +71,8 @@ class RemotingInstrumentation { case _ ⇒ throw new IllegalArgumentException(s"Address [${address}] could not be serialized: host or port missing.") } - @Pointcut("execution(* akka.remote.transport.AkkaPduProtobufCodec$.decodeMessage(..)) && args(bs, provider, localAddress)") // && args(raw, provider, localAddress)") - def decodeRemoteMessage(bs: ByteString, provider: RemoteActorRefProvider, localAddress: Address): Unit = {} //(raw: ByteString, provider: RemoteActorRefProvider, localAddress: Address): Unit = {} + @Pointcut("execution(* akka.remote.transport.AkkaPduProtobufCodec$.decodeMessage(..)) && args(bs, provider, localAddress)") + def decodeRemoteMessage(bs: ByteString, provider: RemoteActorRefProvider, localAddress: Address): Unit = {} @Around("decodeRemoteMessage(bs, provider, localAddress)") def aroundDecodeRemoteMessage(pjp: ProceedingJoinPoint, bs: ByteString, provider: RemoteActorRefProvider, localAddress: Address): AnyRef = { |