kamon {
datadog {
hostname = datadog
port = 8125
application-name = ${?app.name}
}
metric {
tick-interval = 1 seconds
track-unmatched-entities = yes
}
}
MetricsReporter
listener from kafka-client.
kamon-kafka
?
We’re running apps with kamon in Docker. If we base our apps on openjdk:8-jre-slim
then we get the following errors:
java.lang.reflect.InvocationTargetException: null
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at kamon.Init.attachInstrumentation(Init.scala:57)
at kamon.Init.attachInstrumentation$(Init.scala:52)
at kamon.Kamon$.attachInstrumentation(Kamon.scala:19)
at kamon.Init.init(Init.scala:43)
at kamon.Init.init$(Init.scala:42)
at kamon.Kamon$.init(Kamon.scala:19)
at com.itv.vindler.Main$.<clinit>(Main.scala:17)
at com.itv.vindler.Main.main(Main.scala)
Caused by: java.lang.IllegalStateException: No compatible attachment provider is available
at kamon.lib.net.bytebuddy.agent.ByteBuddyAgent.install(ByteBuddyAgent.java:416)
at kamon.lib.net.bytebuddy.agent.ByteBuddyAgent.attach(ByteBuddyAgent.java:248)
at kamon.lib.net.bytebuddy.agent.ByteBuddyAgent.attach(ByteBuddyAgent.java:223)
at kamon.lib.net.bytebuddy.agent.ByteBuddyAgent.attach(ByteBuddyAgent.java:210)
at kamon.bundle.Bundle$.$anonfun$attach$3(Bundle.scala:34)
at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.scala:18)
at kamon.bundle.Bundle$.withInstrumentationClassLoader(Bundle.scala:88)
at kamon.bundle.Bundle$.attach(Bundle.scala:34)
at kamon.bundle.Bundle.attach(Bundle.scala)
If we base it on openjdk:8-jdk-slim
instead then it’s fine. Does anyone have any suggestions? I didn’t think that the actual runtime would differ between the jre and jdk, the jre just shouldn’t have javac
etc on the path
-javaaagent:/path/to/kanela.jar
startup parameter and it should work. If you are using SBT, I recommend using the sbt-javaagent plugin. There is a bit extra info here: https://kamon.io/docs/latest/guides/installation/setting-up-the-agent/
kamon-bundle
which autoloads the kanela agent but this requires the jvm attach
API, which is only shipped with the jdk and not the jre. Which is why (as you said) explicitly enable the agent using -javaagent
allows you to use the jre instead :)
metric.path=87.0|ms
, for some reason ever since we did the update even though the metrics still appear in tcpdump, around 90% of them are getting lost between statsd and graphite, given that the only thing we changed that seems to impact this is the kamon version we're somewhat stumped. does anyone have any ideas? thanks in advance
cat /proc/net/udp
?
cat test.dump > /dev/udp/our.ip.goes.here/8125
and noticed that it was successfully received and processed