Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
  • Jun 11 16:10
    ihostage synchronize #760
  • Jun 10 13:26

    SimunKaracic on master

    Initial Lettuce instrumentation Merge pull request #1037 from S… (compare)

  • Jun 10 13:26
    SimunKaracic closed #1037
  • Jun 10 09:33
    SimunKaracic opened #1039
  • Jun 10 09:25

    SimunKaracic on master

    Update README.md Merge pull request #1038 from S… (compare)

  • Jun 10 09:25
    SimunKaracic closed #1038
  • Jun 10 09:25
    SimunKaracic opened #1038
  • Jun 10 09:22
    SimunKaracic commented #1025
  • Jun 10 09:03
    SimunKaracic commented #1025
  • Jun 10 09:01
    SimunKaracic labeled #1025
  • Jun 10 09:00
    SimunKaracic labeled #1012
  • Jun 10 09:00
    SimunKaracic labeled #1012
  • Jun 10 09:00
    SimunKaracic labeled #1020
  • Jun 10 08:59
    SimunKaracic ready_for_review #1037
  • Jun 10 08:59
    SimunKaracic review_requested #1037
  • Jun 09 12:06
    SimunKaracic synchronize #1037
  • Jun 09 11:38
    SimunKaracic opened #1037
  • Jun 07 15:53
    ivantopo edited #1036
  • Jun 07 15:52
    ivantopo opened #1036
  • Jun 07 10:10
    channingwalton commented #1027
Hi There, am trying to get akka metrics using kamon. I am using following versions for bundle and prometheus -> val kamon_bundle = "2.0.5"
val kamon_prometheus = "2.0.1", am using akk version: 2.5.23. We could get metrics neat and clean when am running with java -jar for our executable. val kamonPrometheusReporter = PrometheusReporter() Kamon.registerModule("prometheus-reporter", kamonPrometheusReporter) Kamon.init() . However the moment am trying to bring up the app in my docker which is using amazon correto JRE, am not able to see akka metrics available at my prometheus server end point. I tried to bring up using kanela agent as well, version 1.0.4 java -javaagent:kanela-agent-1.0.4.jar, any pointers as to what could have gone wrong?
1 reply
Paolo Fabbro

Hi, I'm trying to instrument a microservice application using scala Lagom 1.6 but after configuring the dashboard I can't see actor's metrics.
The configuration that I used is:

val kamonBundle = "io.kamon" %% "kamon-bundle" % "2.1.0"
val kamonApmReporter = "io.kamon" %% "kamon-apm-reporter" % "2.1.0"

lazy val dataobject-impl = (project in file("dataobject-impl"))
.enablePlugins(LagomScala, JavaAgent)
libraryDependencies ++= Seq(
) ++ kamonDependencies,
javaAgents += "org.aspectj" % "aspectjweaver" % "1.9.2",
javaOptions in Universal += "-Dorg.aspectj.tracing.factory=default"

Any advice?

5 replies

hi! I used the version of Kamon as follows and set it as below.

compile group: 'com.typesafe.akka', name: "akka-actor-typed_2.13", version: "2.6.10"
compile "io.kamon:kamon-bundle_2.13:2.1.4"
compile "io.kamon:kamon-prometheus_2.13:2.1.4"

The operation of the server worked properly.
But what's wrong with not being able to track metrics related to the actor?

9 replies
eyal farago
hi guys, using akka 2.6.11 + kamon-bundle 2.1.10, I'm seeing repeating class-cast-exceptions related to RoutedActorCell and HasActorMonitor:
An error occurred while trying to apply an advisor: java.lang.ClassCastException: class akka.routing.RoutedActorCell cannot be cast to class kamon.instrumentation.akka.instrumentations.HasActorMonitor (akka.routing.RoutedActorCell and kamon.instrumentation.akka.instrumentations.HasActorMonitor are in unnamed module of loader 'app')
    at kamon.instrumentation.akka.instrumentations.HasActorMonitor$.actorMonitor(ActorInstrumentation.scala:95)
    at kamon.instrumentation.akka.instrumentations.SendMessageAdvice$.onEnter(ActorInstrumentation.scala:136)
    at akka.routing.RoutedActorCell.sendMessage(RoutedActorCell.scala:138)
    at akka.actor.Cell.sendMessage(ActorCell.scala:326)
    at akka.actor.Cell.sendMessage$(ActorCell.scala:325)
    at akka.actor.ActorCell.sendMessage(ActorCell.scala:410)
    at akka.actor.RepointableActorRef.$bang(RepointableActorRef.scala:178)
    at akka.io.SelectionHandler$SelectorBasedManager$$anonfun$workerForCommandHandler$1.applyOrElse(SelectionHandler.scala:118)
    at akka.actor.Actor.aroundReceive(Actor.scala:537)
    at akka.actor.Actor.aroundReceive$(Actor.scala:535)
    at akka.io.SelectionHandler$SelectorBasedManager.aroundReceive(SelectionHandler.scala:101)
    at akka.actor.ActorCell.receiveMessage(ActorCell.scala:577)
    at akka.actor.ActorCell.invoke(ActorCell.scala:547)
    at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:270)
    at akka.dispatch.Mailbox.run(Mailbox.scala:231)
    at akka.dispatch.Mailbox.exec(Mailbox.scala:243)
    at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
    at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
    at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
    at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
    at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183)
is this a kamon bug?
eyal farago
seems like the instrumentation doesn't apply to RouterActorCell but since its sendMessage method delegates to super.sendMessage it ends up invoking the adviced code which attempts the cast
override def sendMessage(envelope: Envelope): Unit = {
    if (routerConfig.isManagementMessage(envelope.message))
      router.route(envelope.message, envelope.sender)
2 replies
Stela L.
Hey there, I am using kamon 2.1.9, I get some weird errors every 0.10 seconds : " Failed to get information to use statvfs. path: /root/.cache/gvfs, Error code: 13", I mean it's producing metrics on <>:9095 port, but I would like to fix this, (gave a try to install libfilesys-statvfs-perl << I am using ubuntu 20, didn't work). Anyone seen and solved this?
1 reply
Zvi Mints

Hey! Im using

 lazy val kamon = Seq(
    "io.kamon" %% "kamon-system-metrics" % "0.6.7",
    "io.kamon" %% "kamon-scala" % "0.6.7",
    "io.kamon" %% "kamon-play-2.6" % "0.6.8",
    "io.kamon" %% "kamon-akka-2.5" % "0.6.8",
    "io.kamon" %% "kamon-datadog" % "0.6.8"
  ).map(_.exclude("org.asynchttpclient", "async-http-client"))

And having the following error on starting application:

java.io.FileNotFoundException: /opt/docker/native/libsigar-amd64-linux.so (No such file or directory)
    at java.io.FileOutputStream.open0(Native Method)
    at java.io.FileOutputStream.open(FileOutputStream.java:270)
    at java.io.FileOutputStream.<init>(FileOutputStream.java:213)
    at java.io.FileOutputStream.<init>(FileOutputStream.java:162)
    at kamon.sigar.SigarProvisioner.provision(SigarProvisioner.java:172)
    at kamon.system.SystemMetricsExtension.<init>(SystemMetricsExtension.scala:52)
    at kamon.system.SystemMetrics$.createExtension(SystemMetricsExtension.scala:34)
    at kamon.system.SystemMetrics$.createExtension(SystemMetricsExtension.scala:32)
    at akka.actor.ActorSystemImpl.registerExtension(ActorSystem.scala:1006)
    at akka.actor.ExtensionId.apply(Extension.scala:79)
    at akka.actor.ExtensionId.apply$(Extension.scala:78)
    at kamon.system.SystemMetrics$.apply(SystemMetricsExtension.scala:32)
    at akka.actor.ExtensionId.get(Extension.scala:92)
    at akka.actor.ExtensionId.get$(Extension.scala:92)
    at kamon.system.SystemMetrics$.get(SystemMetricsExtension.scala:32)
    at kamon.ModuleLoaderExtension.$anonfun$new$3(ModuleLoader.scala:43)
    at scala.util.Success.$anonfun$map$1(Try.scala:255)
    at scala.util.Success.map(Try.scala:213)
    at kamon.ModuleLoaderExtension.$anonfun$new$2(ModuleLoader.scala:41)
    at scala.collection.immutable.List.foreach(List.scala:392)
    at kamon.ModuleLoaderExtension.<init>(ModuleLoader.scala:38)
    at kamon.ModuleLoader$.createExtension(ModuleLoader.scala:27)
    at kamon.ModuleLoader$.createExtension(ModuleLoader.scala:25)
    at akka.actor.ActorSystemImpl.registerExtension(ActorSystem.scala:1006)
    at kamon.Kamon$Instance._start$lzycompute(Kamon.scala:64)
    at kamon.Kamon$Instance._start(Kamon.scala:58)
    at kamon.Kamon$Instance.start(Kamon.scala:74)
    at kamon.Kamon$.start(Kamon.scala:41)
    at kamon.play.di.GuiceModule$KamonLoader.<init>(GuiceModule.scala:36)
    at kamon.play.di.GuiceModule$KamonLoader$$FastClassByGuice$$d6cb6187.newInstance(<generated>)

How can i disable it?

5 replies
Mark Dufresne
Hey folks, anyone know if kamon-datadog supports unix domain sockets ?
Mark Dufresne
also, anyone ever run into data-dog agent (same container as app) refusing connection?
2021-02-07 01:35:26.771 ERROR 1 --- [dogSpanReporter] kamon.module.ModuleRegistry              : Reporter [DatadogSpanReporter] failed to process a spans tick.

java.net.ConnectException: Connection refused (Connection refused)
Nikhil Arora
May I ask if Kamon can also monitor apache http client and okayhttpclient If I use it in Lagom ?
1 reply
@subrotosanyal hi!. Did you find any way to use Kamon in Tomcat environment?
Channing Walton
Hi, I've just upgraded kamon from 2.1.10 to 2.1.11 and am getting java.lang.NoClassDefFoundError: akka/http/Version$
The dependencies I have are kamon-bundle and kamon-influxdb.
What could I be missing?
4 replies
I'd like to link Kanela (1.0.7) to Tomcat (8) , could you give me a detailed guide?
I don't know what to do with the information below.
1.Patching catalina code Bootstrapper,and including Kamon.init there.
2.Include kamon/akka/scala/config libs in a special bootlib dir inside tomcat
3.Configure tomcat catalina.sh CLASSPATH to include bootlib dir
4.Remove kamon/akka/scala/config libs from my webapp WEB-INF/lib dir to prevent colissions
5.Put application.conf file in bootlib dir for kamon configuration
Giridhar Pathak
hey. to get kamon setup, do i need both the kanela agent and the aspectjweaver agent?
i am currently getting random data out of kamon's prometheus reporter. stuff like total actors running == 4881 while the application just spins up 2.
1 reply
this is a simple java application with a main function that spins up an actor system and 2 behaviors. (using akka type 2.6.12)
the metrics looks random.
currently using kamon-core, kamon-akka, kamon-promethues version 2.1.11 scala version 2.13
Alexis Hernandez
since an upgrade, I started getting this error, any ideas:
WARNING: sun.reflect.Reflection.getCallerClass is not supported. This will impact performance. [Attach Listener] ERROR 2021-02-12 11:41:02 Logger : Unable to start Kanela Agent. Please remove -javaagent from your startup arguments and contact Kanela support.: java.lang.NoClassDefFoundError: Could not initialize class org.apache.logging.log4j.util.PropertiesUtil at org.apache.logging.log4j.status.StatusLogger.<clinit>(StatusLogger.java:78) at org.apache.logging.log4j.LogManager.<clinit>(LogManager.java:60)
Alexis Hernandez
I have reverted from 2.1.12 until 2.1.8 (one by one) which used to work fine, and I wonder if this could be an incompatibility with sbt 1.4.7 or scala 2.12
5 replies
Alexis Hernandez
apparently, this occurs only in sbt, and it works when packaging my play app for production, is there a way to disable kamon when running it from sbt? I saw a PR got merged, that allows disabling kamon
Ben Iofel
Is kamon supposed to be instrumenting its own reporters? I see zipkin traces of data being sent to zipkin in an endless loop, even when my server is getting 0 requests. Can i turn that off?
2 replies
Alexis Hernandez
again, I started getting this issue, its getting really annoying:
2021-02-12 19:33:22,678 [WARN] from oshi.software.os.linux.LinuxOperatingSystem in Process Metrics - Failed to read process file: /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java (deleted)
8 replies
Giridhar Pathak
hey! is it possible to have compile time weaving for kamon metrics instead of using the agent?

Hi there,
having trouble with the PrometheusPushgatewayReporter. I've setup a Scala sbt project with following versions:

val kamonApmReporter = "2.1.12"
val kamonBundle = "2.1.12"
val kamonPrometheus = "2.1.12"
val kanelaAgent = "1.0.7"

libraryDependencies ++= Seq(
   "io.kamon" %% "kamon-apm-reporter" % kamonPrometheus,
   "io.kamon" %% "kamon-bundle"       % kamonBundle,
   "io.kamon" %% "kamon-prometheus"   % kamonPrometheus

javaAgents += "io.kamon" % "kanela-agent" % kanelaAgent

Config looks like this:

kamon {
    environment {
        tags {
            app = "my-scala-job"
    modules {
        status-page {
            enabled = false
        apm-reporter {
            enabled = false
        host-metrics {
            enabled = false
        prometheus-reporter {
            enabled = false
        pushgateway-reporter {
            # activate pushgateway-reporter
            enabled = true
    prometheus {
        include-environment-tags = yes
        embedded-server.port = 4001

        # Settings relevant to the PrometheusPushgatewayReporter
        pushgateway {
            api-base-url = "http://localhost:9091/metrics"

            api-url = ${kamon.prometheus.pushgateway.api-base-url}"/job/my-scala-job"

kanela {
    show-banner = false

I do have a local docker container running for prom/pushgateway:v1.4.0. It is listing the metric, but only with the default push_time_seconds and push_failure_time_seconds gauges. No other metrics.

If I do

echo "mymetric 99" | curl --data-binary @- http://localhost:9091/metrics/job/my-push-job

it is displayed in pushgateway's UI. So, I don't expect the issue to be on pushgateways side.

If I activate the "normal" PrometheusReporter it shows the expected metrics, like akka etc.

Any ideas, where the issue could be?

Thx in advance.

2 replies
Hi, is there plan to support open-telemetry (the tracing side of it)? Conceptually seems like there isn't much difference from zipkin/jaeger but reality is often more complex so I want to understand what roadblocks are there. (I haven't looked deeply in to open telemetry yet)
Ben Iofel
Hey everyone. I added the zipkin reporter to our API proxy which handles as high as 180 req / sec / instance. After about 5 hours, the CPU got stuck at 200% struggling to garbage collect, with the heap size not dropping, causing significantly increased request latency, until the commit was reverted. We were using the default sampler (adaptive). Does anybody have any thoughts as to why this would happen?
4 replies
reporter deployed at about 19:00, and CPU spikes at about 1:00, reporter removed at 8:00
Has someone tried running Kamon in java application, using akka framework ?
A. Alonso Dominguez
Hi all, probably this has been discussed earlier (in that case, sorry for bringing it back). We are using Kamon with logback context tags in a series of Akka HTTP microservices and we see that, sometimes, the logs don’t get populated with the additional context tags. It usually takes several restarts of a service to see the tags showing up in their values in the logs. We think it is related to this issue, is anyone aware of what could be the root cause? kamon-io/Kamon#919
Elias Court
Hi all - we're having an issue running the Kamon host-metrics module on the latest adoptopenjdk/openjdk8-openj9 alpine slim image (jdk8u282-b08_openj9-0.24.0-alpine-slim).
If we disable the host metrics module or go back to the previous image (jdk8u275-b01_openj9-0.23.0-alpine-slim) then everything appears to be fine.
The error we're getting is the following:
 _  __                _        ______
| |/ /               | |       \ \ \ \
| ' / __ _ _ __   ___| | __ _   \ \ \ \
|  < / _` | '_ \ / _ \ |/ _` |   ) ) ) )
| . \ (_| | | | |  __/ | (_| |  / / / /
|_|\_\__,_|_| |_|\___|_|\__,_| /_/_/_/
Running with Kanela, the Kamon Instrumentation Agent :: (v1.0.6)
11:17:28.309 [main] INFO  kamon.status.page.StatusPage  - Status page started on -
Unhandled exception
Type=Segmentation error vmState=0x00040000
J9Generic_Signal_Number=00000018 Signal_Number=0000000b Error_Value=00000000 Signal_Code=00000080
Handler1=00007FC2C2C12DA0 Handler2=00007FC2C24F3020 InaccessibleAddress=0000000000000000
RDI=00007FC2817D85A0 RSI=00007FC2C3F31370 RAX=34F543EFC42A4CC0 RBX=00007FC2780139D0
RCX=00007FC278013AC0 RDX=0000000000000000 R8=00007FC2C406FF60 R9=00007FC27803C418
R10=00007FC2817DC9E0 R11=00007FC2A80F78C9 R12=00007FC2817D8648 R13=00007FC2A8105000
R14=0000000000000001 R15=00007FC2817DCBB0
RIP=00007FC2C3F31980 GS=0000 FS=0000 RSP=00007FC2817D85A0
EFlags=0000000000010206 CS=0033 RBP=0000000000000001 ERR=0000000000000000
TRAPNO=000000000000000D OLDMASK=0000000000000000 CR2=0000000000000000
xmm0 0000000000000000 (f: 0.000000, d: 0.000000e+00)
xmm1 00ff000000000000 (f: 0.000000, d: 7.063274e-304)
xmm2 65677261742f3074 (f: 1949249664.000000, d: 3.040402e+180)
xmm3 2f30303a30303030 (f: 808464448.000000, d: 2.133265e-81)
Bartłomiej Wierciński

hi, I'm unable to compile the project locally because i'm getting

[error] lmcoursier.internal.shaded.coursier.error.FetchError$DownloadingArtifacts: Error fetching artifacts:
[error] file:/home/b.wiercinski/.m2/repository/io/netty/netty-transport-native-epoll/4.1.50.Final/netty-transport-native-epoll-4.1.50.Final-linux-x86_64.jar: not found: /home/b.wiercinski/.m2/repository/io/netty/netty-transport-native-epoll/4.1.50.Final/netty-transport-native-epoll-4.1.50.Final-linux-x86_64.jar

any hints?

running on fedora 33 with sbt 1.4.7
Bartłomiej Wierciński
Bartłomiej Wierciński
ok i've manually downloaded the missing file from https://repo1.maven.org/maven2/io/netty/netty-transport-native-epoll/4.1.50.Final/netty-transport-native-epoll-4.1.50.Final-linux-x86_64.jar , but it was strange that sbt didn't want to download the file by himself
Ramakrishna Hande

Hi , I am working with Kamon Zipkin to trace the request. The request has

1) call to database that returns Result as a Monix Task say Task[T]
2) I am using that result to make callls to a different webservice which is of type Future[HttpResponse]
3) Using result from 2, I am making another Database call

Now before step 1 trace_id is present, and it gets lost after step 1 and nothing after gets traced .

Now If I replace 1) by a static list of records instead of a DB call and then tracing happens successfully

"io.kamon" %% "kamon-core" % “2.1.9”,
"io.kamon" %% "kamon-scala-future" % “2.1.9"
"io.kamon" %% "kamon-executors" % “2.1.9”,
"io.kamon" %% "kamon-zipkin" % “2.1.9"
"io.kamon" %% "kamon-logback" % “2.1.9"

Is there any known issue with Monix tasks w.r.t tracing ???

Thanks in advance

Yaroslav Derman
Hello @SimunKaracic @ivantopo what can you say about kamon-io/Kamon#926 ?
4 replies
federico cocco
Hello. May I ask if there is any documentation available for https://mvnrepository.com/artifact/io.kamon/kamon-cats-io_2.13? Thanks!
2 replies
Would it be possible for the build to produce a kamon-bundle sources JAR?
1 reply
I mean currently there is one, but it's mostly empty
With the use of sbt-assembly and shading rules, I'm not sure if it would be easy (or possible), but it would be nice to have!
Hmm, an old unresolved SO question about the same...
Hi Team, I am trying to integrate the Kamon into the Lagom Microservice. At the time of server startup, I am seeing the below error and not able to see the metrics captured in the configured port. Please help me on this.
7 replies
SLF4J: Actual binding is of type [ch.qos.logback.classic.util.ContextSelectorStaticBinder]
2021-03-15T08:22:21.461Z [ERROR][main] [CORR-ID -
] Init.attachInstrumentation 71 - Failed to attach the instrumentation agent
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:65)
at kamon.Init.attachInstrumentation$(Init.scala:60)
at kamon.Kamon$.attachInstrumentation(Kamon.scala:19)
at kamon.Init.init(Init.scala:36)
at kamon.Init.init$(Init.scala:35)
at kamon.Kamon$.init(Kamon.scala:19)
at kamon.Kamon.init(Kamon.scala)
at com.retisio.arc.account.impl.module.AccountModule.configure(AccountModule.java:38)
at com.google.inject.AbstractModule.configure(AbstractModule.java:61)
at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:344)
at com.google.inject.spi.Elements.getElements(Elements.java:103)
at com.google.inject.util.Modules$OverrideModule.configure(Modules.java:173)
at com.google.inject.AbstractModule.configure(AbstractModule.java:61)
at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:344)
at com.google.inject.spi.Elements.getElements(Elements.java:103)
at com.google.inject.internal.InjectorShell$Builder.build(InjectorShell.java:137)
at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:103)
at com.google.inject.Guice.createInjector(Guice.java:87)
at com.google.inject.Guice.createInjector(Guice.java:78)
at play.api.inject.guice.GuiceBuilder.injector(GuiceInjectorBuilder.scala:200)
at play.api.inject.guice.GuiceApplicationBuilder.build(GuiceApplicationBuilder.scala:155)
at play.api.inject.guice.GuiceApplicationLoader.load(GuiceApplicationLoader.scala:21)
at play.core.server.ProdServerStart$.start(ProdServerStart.scala:54)
at play.core.server.ProdServerStart$.main(ProdServerStart.scala:30)
at play.core.server.ProdServerStart.main(ProdServerStart.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:50)
at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.scala:18)
at kamon.bundle.Bundle$.withInstrumentationClassLoader(Bundle.scala:104)
at kamon.bundle.Bundle$.attach(Bundle.scala:50)
at kamon.bundle.Bundle.attach(Bundle.scala)
... 29 common frames omitted
2021-03-15T08:22:21.817Z [INFO][main] [CORR-ID -