kamon-io / Kamon

Distributed Tracing, Metrics and Context Propagation for applications running on the JVM
https://kamon.io
Other
1.4k stars 326 forks source link

Trying to load Akka instrumentation when using Pekko in Scala 3 #1332

Open drenizg opened 3 months ago

drenizg commented 3 months ago

Hi,

I'm moving my Pekko project to Scala 3.3.3, and when I run it, it throws this warning (Only for Scala 3; same code runs fine when compiled with Scala 2.13):

[Attach Listener] WARNING 2024-04-01 08:16:53  Logger : Error trying to load Instrumentation: kamon.instrumentation.akka.instrumentations.akka_25.DispatcherInstrumentation with error: java.lang.ClassNotFoundException: kamon.instrumentation.akka.instrumentations.akka_25.DispatcherInstrumentation 
[Attach Listener] WARNING 2024-04-01 08:16:53  Logger : Error trying to load Instrumentation: kamon.instrumentation.akka.instrumentations.akka_25.remote.RemotingInstrumentation with error: java.lang.ClassNotFoundException: kamon.instrumentation.akka.instrumentations.akka_25.remote.RemotingInstrumentation 
[2024-04-01 08:16:54,498] [INFO] [kamon.status.page.StatusPage] [] [main] - Status Page started on http://0.0.0.0:5266/ MDC: {}
[2024-04-01 08:16:54,753] [INFO] [kamon.prometheus.PrometheusReporter] [] [main] - Started the embedded HTTP server on http://0.0.0.0:9095/metrics MDC: {}
[2024-04-01 08:16:54,801] [INFO] [kamon.Init] [] [main] - 
 _
| |
| | ____ _ _ __ ___   ___  _ __
| |/ / _  |  _ ` _ \ / _ \|  _ \
|   < (_| | | | | | | (_) | | | |
|_|\_\__,_|_| |_| |_|\___/|_| |_|
=====================================
Initializing Kamon Telemetry v2.7.1 / Kanela v1.0.18
 MDC: {}

As a workaround, I successfully disabled those modules in application.conf file:

kanela.modules {
  akka.enabled = false
  akka-remote.enabled = false
}

Any ideas on why is it trying to load Akka instrumentation in a Pekko project with no Akka dependencies?

Dichotomia commented 3 months ago

I confirm this issue.