;
in Kamon and with ,
in the proposal (apart from the actual name of the header value - which is configurable already)
Hello, Kamon dev. Here’s my config https://controlc.com/cf392b75. I can’t send anything to influxdb with Kamon because of
ERROR kamon.influxdb.InfluxDBReporter - Metrics POST to InfluxDB failed with status code [404], response body: {"error":"database not found: \"mydb\””}
error. I can’t understand where did it find mydb
? I have db0
in configs.
Unable to start Kanela Agent. Please remove -javaagent from your startup arguments and contact Kanela support.: java.lang.NoClassDefFoundError: com/datastax/driver/core/Session
Hi I’m using kanela-agent on a play project and I want to add support for httpok. So I added on my build.sbt
-> "io.kamon" %% "kamon-okhttp" % "1.0.3”
and the configuration to enable it as it says on reference.conf
The error that I’m facing right now is the following
Caused by: java.lang.ClassNotFoundException: kanela.agent.api.instrumentation.KanelaInstrumentation
at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:468)
at java.net.URLClassLoader.access$100(URLClassLoader.java:74)
at java.net.URLClassLoader$1.run(URLClassLoader.java:369)
at java.net.URLClassLoader$1.run(URLClassLoader.java:363)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:362)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at kanela.agent.util.classloader.ChildFirstURLClassLoader.loadClass(ChildFirstURLClassLoader.java:58)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:348)
at kanela.agent.InstrumentationLoader.lambda$loadInstrumentation$b85f757d$1(InstrumentationLoader.java:58)
at kanela.agent.libs.io.vavr.control.Try.of(Try.java:75)
at kanela.agent.InstrumentationLoader.loadInstrumentation(InstrumentationLoader.java:56)
at kanela.agent.InstrumentationLoader.lambda$null$1(InstrumentationLoader.java:46)
at kanela.agent.libs.io.vavr.collection.List.flatMap(List.java:898)
at kanela.agent.InstrumentationLoader.lambda$load$4(InstrumentationLoader.java:46)
at kanela.agent.libs.io.vavr.collection.List.map(List.java:1038)
at kanela.agent.InstrumentationLoader.load(InstrumentationLoader.java:43)
at kanela.agent.Kanela.lambda$null$0(Kanela.java:79)
at kanela.agent.util.classloader.InstrumentationClassPath.use(InstrumentationClassPath.java:84)
at kanela.agent.Kanela.lambda$start$1(Kanela.java:68)
at kanela.agent.util.Execution.timed(Execution.java:32)
at kanela.agent.util.Execution.runWithTimeSpent(Execution.java:41)
at kanela.agent.Kanela.start(Kanela.java:67)
at kanela.agent.Kanela.premain(Kanela.java:47)
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 sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:386)
at sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:401)
Should I add another dependency ? Also I could not find any examples of this so I’m lost
javaAgents += "io.kamon" % "kanela-agent" % "1.0.5",
val XKey = Key.broadcastString("x-key")
val context =
Kamon.currentContext().get(XKey) match {
case None =>
Kamon.currentContext().withKey(XKey, Some("XKey Value"))
case _ => Kamon.currentContext()
}
Kamon.withContext(context) {
for {
result <- httpClient(Get(uri))
} yield result
}
Kamon.init()
as the very first operation in your code. I am deploying my service as a war, and I'm getting an java.lang.reflect.InvocationTargetException
when I call it in the Context Listener. Where should I be calling it?