Can't get Atmos tracing to work in Play application

223 views
Skip to first unread message

Kevin Hoffman

unread,
Nov 17, 2013, 12:16:32 PM11/17/13
to typesafe...@googlegroups.com
Folks,
  I am trying to follow the sample guidelines as well as the other various sources of information but I'm having a hell of a time, running into a couple of issues.

My dependencies:

libraryDependencies ++= Seq(
  jdbc,
  anorm,
  cache,
  "com.typesafe.akka" %% "akka-contrib" % "2.2.1",
  "com.typesafe.akka" %% "akka-testkit" % "2.2.1",
  "com.typesafe.atmos" % "trace-play-2.2.0" % "1.3.1",
  "com.typesafe.atmos" % "trace-akka-2.2.1_2.10" % "1.3.1",
  "ch.qos.logback"     % "logback-classic" % "1.0.7",  
  "org.scalatest" % "scalatest_2.10" % "1.9.1" % "test"
)     


1. When I just start my actor system cluster (I am not using the default play actor system), I get the following error message about missing a dylib file for sigar:

DEBUG Sigar  - no libsigar-universal64-macosx.dylib in java.library.path

org.hyperic.sigar.SigarException: no libsigar-universal64-macosx.dylib in java.library.path
at org.hyperic.sigar.Sigar.loadLibrary(Sigar.java:172)
at org.hyperic.sigar.Sigar.<clinit>(Sigar.java:100)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at akka.actor.ReflectiveDynamicAccess$$anonfun$createInstanceFor$2.apply(DynamicAccess.scala:78)
at scala.util.Try$.apply(Try.scala:161)
at akka.actor.ReflectiveDynamicAccess.createInstanceFor(DynamicAccess.scala:73)

... etc ...

I don't know how to make this file available to my Play application (I do have it on disk, it came with the console download), so that's problem #1.


Problem #2 is when I attempt to add the trace extension to the event handler in akka's configuration:

#  event-handlers = ["com.typesafe.atmos.trace.Slf4jTraceContextEventHandler"]

I get a "class not found" error for this class. I don't know if this class can't be loaded or if one of it's dependencies is failing to be loaded, but the whole thing is driving me nuts.

All I want to do is some basic monitoring on an actor system I am creating when my play application starts.

I am using the latest (2.2.1) version of Play and Akka. Any help here would be amazingly helpful.

Jim Powers

unread,
Nov 17, 2013, 12:29:05 PM11/17/13
to typesafe...@googlegroups.com
Kevin,

You might want to try sbt-atmos: https://github.com/sbt/sbt-atmos - it will greatly simplify your setup.

--
Jim Powers

Jim Powers

unread,
Nov 17, 2013, 1:15:09 PM11/17/13
to typesafe...@googlegroups.com
Kevin,

Yes, sbt-atmos works with Play applications. See the appreciate section of the README.md on the sbt-atmos github site.

--
Jim Powers

Reply all
Reply to author
Forward
0 new messages