diff options
author | Ivan Topolnak <ivantopo@gmail.com> | 2013-08-26 19:24:56 -0300 |
---|---|---|
committer | Ivan Topolnak <ivantopo@gmail.com> | 2013-08-26 19:24:56 -0300 |
commit | d882e8e8ca6da081feac96f3d4eea197a9f84d12 (patch) | |
tree | ab67f2c4850e38c493cd712029b26fb5c52cde4b /kamon-core/src | |
parent | b678e3250576a0352bfc1d8c4ee5ee2a62b75715 (diff) | |
download | Kamon-d882e8e8ca6da081feac96f3d4eea197a9f84d12.tar.gz Kamon-d882e8e8ca6da081feac96f3d4eea197a9f84d12.tar.bz2 Kamon-d882e8e8ca6da081feac96f3d4eea197a9f84d12.zip |
Some sort of basic logging with UOW
Diffstat (limited to 'kamon-core/src')
3 files changed, 9 insertions, 7 deletions
diff --git a/kamon-core/src/main/resources/META-INF/aop.xml b/kamon-core/src/main/resources/META-INF/aop.xml index 0f1895ec..0f427611 100644 --- a/kamon-core/src/main/resources/META-INF/aop.xml +++ b/kamon-core/src/main/resources/META-INF/aop.xml @@ -19,7 +19,7 @@ <!-- <aspect name="kamon.instrumentation.ExecutorServiceFactoryProviderInstrumentation"/> <aspect name="kamon.instrumentation.NamedExecutorServiceFactoryDelegateInstrumentation"/>--> <aspect name="kamon.instrumentation.ActorSystemInstrumentation"/> - <aspect name ="kamon.instrumentation.ForkJoinPoolInstrumentation"/> + <!--<aspect name ="kamon.instrumentation.ForkJoinPoolInstrumentation"/>--> diff --git a/kamon-core/src/main/scala/kamon/instrumentation/ActorRefTellInstrumentation.scala b/kamon-core/src/main/scala/kamon/instrumentation/ActorRefTellInstrumentation.scala index 212eab2c..7d3e36ca 100644 --- a/kamon-core/src/main/scala/kamon/instrumentation/ActorRefTellInstrumentation.scala +++ b/kamon-core/src/main/scala/kamon/instrumentation/ActorRefTellInstrumentation.scala @@ -16,16 +16,18 @@ case class TraceableMessage(traceContext: Option[TraceContext], message: Any, ti class ActorRefTellInstrumentation { import ProceedingJoinPointPimp._ + val t2 = Metrics.registry.timer("some" + "LATENCY") + @Pointcut("execution(* akka.actor.ScalaActorRef+.$bang(..)) && !within(akka.event.Logging.StandardOutLogger) && !within(akka.pattern.PromiseActorRef) && !within(akka.actor.DeadLetterActorRef) && target(actor) && args(message, sender)") def sendingMessageToActorRef(actor: ActorRef, message: Any, sender: ActorRef) = {} @Around("sendingMessageToActorRef(actor, message, sender)") def around(pjp: ProceedingJoinPoint, actor: ActorRef, message: Any, sender: ActorRef): Unit = { - val actorName = MetricDirectory.nameForActor(actor) - val t = Metrics.registry.timer(actorName + "LATENCY") + //val actorName = MetricDirectory.nameForActor(actor) + //val t = Metrics.registry.timer(actorName + "LATENCY") //println(s"Wrapped message from [$sender] to [$actor] with content: [$message]") - pjp.proceedWithTarget(actor, TraceableMessage(Tracer.context, message, t.time()), sender) + pjp.proceedWithTarget(actor, TraceableMessage(Tracer.context, message, t2.time()), sender) } } @@ -66,7 +68,7 @@ class ActorCellInvokeInstrumentation { //println("ENVELOPE --------------------->"+envelope) envelope match { case Envelope(TraceableMessage(ctx, msg, timer), sender) => { - timer.stop() + //timer.stop() val originalEnvelope = envelope.copy(message = msg) diff --git a/kamon-core/src/main/scala/kamon/instrumentation/MessageQueueMetrics.scala b/kamon-core/src/main/scala/kamon/instrumentation/MessageQueueMetrics.scala index c21502ac..6a1e291f 100644 --- a/kamon-core/src/main/scala/kamon/instrumentation/MessageQueueMetrics.scala +++ b/kamon-core/src/main/scala/kamon/instrumentation/MessageQueueMetrics.scala @@ -48,12 +48,12 @@ class MonitoredMessageQueue(val delegate: MessageQueue, val queueSizeHistogram: def enqueue(receiver: ActorRef, handle: Envelope) = { delegate.enqueue(receiver, handle) - queueSizeHistogram.update(numberOfMessages) + //queueSizeHistogram.update(numberOfMessages) } def dequeue(): Envelope = { val envelope = delegate.dequeue() - queueSizeHistogram.update(numberOfMessages) + //queueSizeHistogram.update(numberOfMessages) envelope } |