Unable to trace Spray/Akka application with Typesafe Console 1.3.1

271 views
Skip to first unread message

V

unread,
Dec 27, 2013, 2:24:59 PM12/27/13
to typesafe...@googlegroups.com
Hi,

I've followed what has been outlined in the documentation here; http://resources.typesafe.com/console/docs/1.3.1/index.html, but I've been unable to get tracing for my Actor System to work at all. I'm assuming user error but I'm not sure what I may have overlooked.

My project it a Spray/Akka application. I use Gradle to manage the build and dependencies. I use IntelliJ IDEA 13. I'm currently only trying to run the application via the IDE using the information outlined in the Eclipse IDE setup here: http://resources.typesafe.com/console/docs/1.3.1/manual/sample-app.html#eclipse-ide

This is what I've done...

1. Start Atmos

~TYPESAFE_CONSOLE_HOME|⇒  bin/typesafe-console atmos
2013-12-27 11:58:54,297 INFO  [akka.event.slf4j.Slf4jEventHandler] [] [] : Slf4jEventHandler started
2013-12-27 11:58:54,359 INFO  [U] [ActorSystem(query)] [query-akka.actor.default-dispatcher-3] : *** No license available. Defaulting to in-memory persistence. ***
2013-12-27 11:58:54,556 INFO  [akka.event.slf4j.Slf4jEventHandler] [] [] : Slf4jEventHandler started
2013-12-27 11:58:54,608 INFO  [akka.event.slf4j.Slf4jEventHandler] [] [] : Slf4jEventHandler started
2013-12-27 11:58:54,854 INFO  [akka://query/user/IO-HTTP/listener-0] [akka://query/user/IO-HTTP/listener-0] [query-akka.actor.default-dispatcher-6] : Bound to localhost/127.0.0.1:8660


2. Start my application from IDEA 13

/Library/Java/JavaVirtualMachines/jdk1.7.0_40.jdk/Contents/Home/bin/java -javaagent:/usr/local/typesafe-console/lib/weaver/aspectjweaver.jar -Dorg.aspectj.tracing.factory=default -Djava.library.path=/usr/local/typesafe-console/lib/sigar -Didea.launcher.port=7535 "-Didea.launcher.bin.path=/Applications/IntelliJ IDEA 13.app/bin" -Dfile.encoding=UTF-8 -classpath "<snip for brevity>" com.intellij.rt.execution.application.AppMain com.myorg.hummingbird.app.LocalApplication
objc[7463]: Class JavaLaunchHelper is implemented in both /Library/Java/JavaVirtualMachines/jdk1.7.0_40.jdk/Contents/Home/bin/java and /Library/Java/JavaVirtualMachines/jdk1.7.0_40.jdk/Contents/Home/jre/lib/libinstrument.dylib. One of the two will be used. Which one is undefined.
11:59:48.566 INFO  [] - Slf4jLogger started
11:59:48.608 DEBUG [EventStream(akka://hummingbird-actor-system)] - logger log1-Slf4jLogger started
11:59:48.609 DEBUG [akka://hummingbird-actor-system/system] - now supervising Actor[akka://hummingbird-actor-system/system/UnhandledMessageForwarder#464519782]
11:59:48.609 DEBUG [EventStream(akka://hummingbird-actor-system)] - Default Loggers started
11:59:48.610 DEBUG [akka://hummingbird-actor-system/system/UnhandledMessageForwarder] - started (akka.event.LoggingBus$$anonfun$startDefaultLoggers$2$$anon$1@44f95b1e)
11:59:48.618 DEBUG [akka://hummingbird-actor-system/system] - now supervising Actor[akka://hummingbird-actor-system/system/deadLetterListener#293628091]
11:59:48.624 DEBUG [akka://hummingbird-actor-system/system/deadLetterListener] - started (akka.event.DeadLetterListener@5b9c0686)
11:59:48.655 DEBUG [akka://hummingbird-actor-system/user] - now supervising Actor[akka://hummingbird-actor-system/user/http-service#1821832668]
11:59:48.690 DEBUG [akka://hummingbird-actor-system/user] - now supervising Actor[akka://hummingbird-actor-system/user/IO-HTTP#-2131145849]
11:59:48.694 DEBUG [akka://hummingbird-actor-system/user/IO-HTTP] - started (spray.can.HttpManager@3e600af8)
11:59:48.888 DEBUG [akka://hummingbird-actor-system/user/IO-HTTP] - etc...
(Application starts up fine).

With these JVM options:

-javaagent:/usr/local/typesafe-console/lib/weaver/aspectjweaver.jar
-Dorg.aspectj.tracing.factory=default
-Djava.library.path=/usr/local/typesafe-console/lib/sigar


This is the Atmos configuration in my application.conf file

atmos {
    trace {
      enabled = true
      node = HummingbirdNode

      traceable {
        "*" = on
      }

      sampling {
        "*" = 1
      }
    }
  }


3. I start Typesafe Console UI:

~TYPESAFE_CONSOLE_HOME|⇒  bin/typesafe-console ui
Play server process ID is 7526
2013-12-27 12:00:49,041 INFO  [play] [] [] : Application started (b)
2013-12-27 12:00:49,116 INFO  [play] [] [] : Listening for HTTP on /0:0:0:0:0:0:0:0%0:9900
2013-12-27 12:01:02,402 INFO  [akka.event.slf4j.Slf4jEventHandler] [] [] : Slf4jEventHandler started


My dependencies are:
Additional information:

Scala v2.10.0
Akka v2.2.3
Spray v1.2.0
trace-akka-2.2.1_2.10 v1.3.1


The number of Actor Systems reported in the UI is 0. I read that warnings should be shown in the console of my application if I start it without the Atmos connector running. I see no warnings so I'm not fully sure that my classes are being instrumented. I don't think I need to use the aop.xml to configure which classes are instrumented by the aspectj weaver since the Sample application doesn't use one.

I'm not sure what I've missed. Does any one have any pointers?

Many thanks.
Reply all
Reply to author
Forward
0 new messages