kamon.environment.host
set to auto
and only change it if you really need to. For example, in our own deployments we use an environment variable with the actual name of the host since we are running everything in containers. There are a few settings in the InfluxDB reporter to decide whether you want to set the host tag or not
hey @alexeykiselev, what Kamon versions are you using there?
It's 2.1.0, but configuration may be from older versions.
We set host to internal node ID to show Kamon histograms in Grafana the same as we show metrics created directly. In latter case we just add tag node
with the same ID.
I wonder, is it possible in project where Kamon is used and kamon-system-metrics
also used that direct calls to org.influxdb.InfluxDB
some how polluted with tags that Kamon set.
kamon.zipkin
?
.tag
on the span directly, but I can't read it that way - or can I?
Hi,
we use for our Scala application the Kanela agent 1.0.5. Our application runs with openjdk-14.01 in a docker container.
When the kanela agent is initialized it partially stops.
_ __ _ ______
| |/ / | | \ \ \ \
| ' / __ _ _ __ ___| | __ _ \ \ \ \
| < / _` | '_ \ / _ \ |/ _` | ) ) ) )
| . \ (_| | | | | __/ | (_| | / / / /
|_|\_\__,_|_| |_|\___|_|\__,_| /_/_/_/
==============================
Running with Kanela, the Kamon Instrumentation Agent :: (v1.0.5)
[main] INFO 2020-06-29 12:45:02 Logger : The Module: Executor Service Capture on Submit Instrumentation is disabled
[main] INFO 2020-06-29 12:45:02 Logger : The Module: Akka Remote Instrumentation is disabled
[main] INFO 2020-06-29 12:45:02 Logger : Loading Akka Instrumentation
[main] INFO 2020-06-29 12:45:02 Logger : ==> Loading kamon.instrumentation.akka.instrumentations.EnvelopeInstrumentation
[main] INFO 2020-06-29 12:45:03 Logger : ==> Loading kamon.instrumentation.akka.instrumentations.SystemMessageInstrumentation
[main] INFO 2020-06-29 12:45:03 Logger : ==> Loading kamon.instrumentation.akka.instrumentations.RouterInstrumentation
[main] INFO 2020-06-29 12:45:03 Logger : ==> Loading kamon.instrumentation.akka.instrumentations.ActorInstrumentation
[main] INFO 2020-06-29 12:45:03 Logger : ==> Loading kamon.instrumentation.akka.instrumentations.ActorLoggingInstrumentation
[main] INFO 2020-06-29 12:45:03 Logger : ==> Loading kamon.instrumentation.akka.instrumentations.AskPatternInstrumentation
[main] INFO 2020-06-29 12:45:03 Logger : ==> Loading kamon.instrumentation.akka.instrumentations.EventStreamInstrumentation
[main] INFO 2020-06-29 12:45:03 Logger : ==> Loading kamon.instrumentation.akka.instrumentations.ActorRefInstrumentation
[main] INFO 2020-06-29 12:45:03 Logger : ==> Loading kamon.instrumentation.akka.instrumentations.akka_25.DispatcherInstrumentation
[main] INFO 2020-06-29 12:45:03 Logger : ==> Loading kamon.instrumentation.akka.instrumentations.akka_26.DispatcherInstrumentation
[main] INFO 2020-06-29 12:45:04 Logger : Loading Executor Service Instrumentation
[main] INFO 2020-06-29 12:45:04 Logger : ==> Loading kamon.instrumentation.executor.ExecutorTaskInstrumentation
Without docker we don't have this problem. With openjdk-13 it also works with docker. Does anyone know this behaviour?
;
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
}