Hello.
I'm having problems in configuring Kamon for Play project.
Datadog agent is up and running, I can report custom metrics using nc:
```
echo "test.counter:10|c" | nc -u -w0 127.0.0.1 8125
```
... and see them in Datadog panel.
Here is my application.conf:
```
akka {
extensions = ["kamon.metric.Metrics", "kamon.datadog.Datadog",
"kamon.system.SystemMetrics", "kamon.logreporter.LogReporter"] }
kamon {
metrics {
filters = [
{
actor {
includes = [ "user/*", "user/worker-*" ]
excludes = [ "system/*" ]
}
},
{
trace {
includes = [ "*" ]
excludes = []
}
}
]
}
datadog {
hostname = "127.0.0.1"
port = 8125
flush-interval = 1 second
max-packet-size = 1024 bytes
report-system-metrics = true
includes {
actor = [ "*" ]
trace = [ "*" ]
dispatcher = [ "*" ]
}
application-name = "webadmin"
}
play {
include-trace-token-header = true
trace-token-header-name = "X-Trace-Token"
}
}
# ... other application settings ...
```
And Build.scala:
```
val akkaVersion = "2.3.5"
val kamonVersion = "0.3.4"
// ...
val webadminLibs = Seq(
play.PlayImport.ws,
"jp.t2v" %% "play2-auth" % "0.12.0",
"org.imgscalr" % "imgscalr-lib" % "4.2",
"com.typesafe.akka" %% "akka-actor" % akkaVersion,
"io.kamon" %% "kamon-core" % kamonVersion,
"io.kamon" %% "kamon-datadog" % kamonVersion,
"io.kamon" %% "kamon-play" % kamonVersion,
"io.kamon" %% "kamon-log-reporter" % kamonVersion,
"io.kamon" %% "kamon-system-metrics" % kamonVersion,
"org.aspectj" % "aspectjweaver" % "1.8.2"
) map {
_ excludeAll(ExclusionRule("org.slf4j", "slf4j-log4j12"),
ExclusionRule("
com.typesafe.play", "play_2.10")) }
// ...
val mmtsWebadmin =
project.in(file("msn-webadmin"))
.enablePlugins(play.Play, play.PlayScala, SbtWeb)
.settings(debCustomSettings ++ sharedSettings: _*)
.settings(
name := "mmts-webadmin",
resolvers += "
t2v.jp repo" at "
http://www.t2v.jp/maven-repo/",
libraryDependencies ++= webadminLibs,
makeEtcDefault := None,
linuxPackageSymlinks := Seq.empty,
serverLoading in Debian := ServerLoader.SystemV
)
.settings(javaOptions <++= AspectjKeys.weaverOptions in Aspectj)
.settings(fork in run := true)
.settings(aspectjSettings :_*)
.dependsOn(mmtsCommons, mmtsBackend)
```
After deploying an application I can see using `ps` that
```
-javaagent:.../org.aspectj.aspectjweaver-1.8.2.jar
```
argument is passed to jvm. Also there are records in wrapper.log like
this:
http://paste.ubuntu.com/9439722/ I'm not sure if this is a good
sign though.
I expect to see metrics like webadmin.gc.collection_time.max, but
there is no webadmin.* metrics at all. This metrics _are_ reported for
similar Play-free application.
What I'm doing wrong?
--
Best regards,
Eax Melanhovich
http://eax.me/