-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Application start fails with NullPointerException because of MicrometerRecorder changes (3.3.0) #35443
Comments
I could find that these changes are introduced here: because of: |
CC @geoand |
/cc @brunobat (micrometer), @ebullient (metrics,micrometer), @jmartisk (metrics) |
Ouch... What a silly mistake on my part! I'll fix it ASAP, sorry for the inconvenience. |
If however you can provide a sample application, we can make sure that nothing else broke as well. |
Fix potential NPE in MicrometerRecorder
Fixes: quarkusio#35443 (cherry picked from commit a8b1641)
Fixes: quarkusio#35443 (cherry picked from commit a8b1641)
Describe the bug
With Quarkus 3.3.0 our application cannot start anymore and fails with a NullPointerException:
We have a custom MeterRegistry (DynatraceMeterRegistry). We configured it exactly like this:
https://quarkus.io/guides/telemetry-micrometer#create-a-customized-meterregistry
After debugging I could see that
registryClasses
quarkus/extensions/micrometer/runtime/src/main/java/io/quarkus/micrometer/runtime/MicrometerRecorder.java
Line 65 in 2c6f8b8
Only contains two registries:
But in this line:
quarkus/extensions/micrometer/runtime/src/main/java/io/quarkus/micrometer/runtime/MicrometerRecorder.java
Line 80 in 2c6f8b8
Quarkus finds three beans:
The loop over the beans with three entries then tries to find the
classSpecificCustomizers
forDynatraceMeterRegistry
:quarkus/extensions/micrometer/runtime/src/main/java/io/quarkus/micrometer/runtime/MicrometerRecorder.java
Line 97 in 2c6f8b8
This returns
null
, which results in aNullPointerException
in line:quarkus/extensions/micrometer/runtime/src/main/java/io/quarkus/micrometer/runtime/MicrometerRecorder.java
Line 99 in 2c6f8b8
Expected behavior
Our application can start as usual 😉 .
Actual behavior
See bug description.
How to Reproduce?
See bug description.
Output of
uname -a
orver
Darwin 22.5.0 Darwin Kernel Version 22.5.0: Thu Jun 8 22:22:22 PDT 2023; root:xnu-8796.121.3~7/RELEASE_X86_64 x86_64
Output of
java -version
openjdk 17.0.7 2023-04-18 LTS
GraalVM version (if different from Java)
No response
Quarkus version or git rev
3.3.0
Build tool (ie. output of
mvnw --version
orgradlew --version
)Maven 3.9.2
Additional information
No response
The text was updated successfully, but these errors were encountered: