I am migrating to Spring Boot 2.0 and I am having issues with my Prometheus Metrics.
I know that MicroMeter is the new way of doing stuff, which is not as crisp as the Prometheus libs but OK.
My issue is that If I do not want to change my metrics now I cannot upgrade to Spring Boot 2.0. Am I right?
I tried the following:
Trial no 1
- Keep my implementations "as is"
- add the new dependency
io.micrometer:micrometer-registry-prometheus:1.0.2
to my app (actuator is already in there) - change stuff in
application.properties
to get access to the endpointactuator/prometheus
=> My Counters
and Gauges
from the past got ignored. OK I understand that from a technical point of view.
Trial no 2
- Keep my implementations "as is"
- add the "old" 'io.prometheus' dependencies and remove the micrometer dependency
- change stuff in
application.properties
to get access to the endpointactuator/prometheus
=> Now I get the following excpetion
Caused by: java.lang.ClassNotFoundException: org.springframework.boot.actuate.endpoint.AbstractEndpoint
at java.net.URLClassLoader.findClass(URLClassLoader.java:381) ~[na:1.8.0_161]
at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[na:1.8.0_161]
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:338) ~[na:1.8.0_161]
at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[na:1.8.0_161]
... 37 common frames omitted
So my question is: Is there a "soft migration" way which works?