-
Notifications
You must be signed in to change notification settings - Fork 327
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nullpointer exception for pekko-instrumentation in version 1.1.0-M1 onward #1352
Comments
Pekko 1.1.0-M1 is released. It is a milestone release but the jars are all up on Maven Central. |
There are some changes in the Pekko dispatch code in v1.1.0-M1. I wouldn't have thought them major. apache/pekko#485 is the biggest change |
@pjfanning sry for the late response. |
i can try if this would help with our problem but im not to optimistic that it will help. |
@ivantopo do you have any idea how to create tests for that? |
I created https://github.com/pjfanning/kamon-pekko-http-test based on the description here and this runs fine with no issues. |
Did you start it with the kanela java-agent? |
Thanks. I hadn't added kanela-agent. The issue happens with it enabled. I updated the sample project. I haven't used Kamon since its early days. I have my own fork that I use myself and it works with Pekko 1.1 (https://github.com/pjfanning/micrometer-pekko). |
I may have messed up the test run but when I tried Scala 3.3.3 and 2.12.19, it seemed ok. Maybe this only happens with Scala 2.13. |
I'm getting this issue now with Pekko 1.1.0. |
I think it's related to inlining. This commit still works: apache/pekko@d829637. This one doesn't: apache/pekko@0f1db53. And if I disable inlining with the |
Seems plausible. Do you see the same behaviour as me - in that Scala 3 and Scala 2.12 work fine but that the NPE pops up with Scala 2.13? The Pekko inlining does not affect the Scala 3 release of Pekko. |
2.12.19 and 3.5.0 didn't give a NPE. |
Is this a bug in Kamon, or a bug in Pekko ? |
Pekko 1.1 uses Scala 2 compiler inlining. Kamon doesn't seem to be able to find the inlined code in Pekko. |
I do have the same issue with 2.13.14 |
To be clear, the Apache Pekko 1.1 releases won't be modified to suit Kamon. We reserve the right in minor releases to make some changes. @mdedetrich just adding to you to the issue just in case you have any thoughts on this. If anyone has any thoughts on hooks that could be added to Pekko 1.2 or 2.0 that makes it easier for Kamon to instrument Pekko then feel free to raise issues or PRs in the Pekko repo(s). |
I created #1361 as a workaround. |
Users hitting this issue should also be able to disable dispatcher instrumentation. See https://github.com/kamon-io/Kamon/blob/124e223de4d7d806b47c76323f5d91edf626fa81/instrumentation/kamon-pekko/src/main/resources/reference.conf and check about excluding dispatchers. |
when testing pekko with the version 1.1.0-M1 which will be released soon we've ran into a nullpointer error when running with Kamon + kanela-instrumentation.
to Reproduce:
build.sbt
Main.scala:
when starting with
-javaagent:javaagent/kanela-agent.jar
(version 1.0.18)i'm receiving the exception:
i've tried to analyze the error and got to the point that
kamon/instrumentation/pekko/instrumentations/DispatcherInstrumentation.scala:164
does not seem to get triggered with pekko 1.1.0-M1 anymore resulting in
dispatcherPrerequisites
being null inkamon/instrumentation/pekko/instrumentations/DispatcherInstrumentation.scala:125
but i cannot understand what change in pekko 1.0.3 <-> 1.1.0-M1 made that difference and how to fix it
The text was updated successfully, but these errors were encountered: