client_java icon indicating copy to clipboard operation
client_java copied to clipboard

spring boot----prometheus 1.7.1 can not scrap data,2.0beta can

Open Jaware opened this issue 9 years ago • 4 comments

prometheus 1.7.1 can not scrap data while 2.0beta can

Jaware avatar Aug 16 '17 06:08 Jaware

Prometheus 1.7.1 has more sanity checks so someone is probably using Spring Boot's metrics incorrectly and getting caught. This is a bug with the libraries you're using.

brian-brazil avatar Aug 16 '17 09:08 brian-brazil

i am using simpleclient_spring_boot 0.0.26 ,you mean this is the bug of prometheus1.7.1? is there any other solution?2.0 is in beta

Jaware avatar Aug 17 '17 03:08 Jaware

I'm hesitant to recommend a different library (@brian-brazil let me know if this recommendation is off base and I'll happily delete it).

I would recommend using the micrometer.io library for Spring Boot metrics. It has Spring specific bindings and outputs to Prometheus. It will be included in Spring 2.0 that is coming out next month as well. It supports dimensional metrics like prometheus directly so it avoids the simpleclient_spring_boot problem of trying to shoehorn hierarchical metrics into Prometheus.

checketts avatar Aug 17 '17 04:08 checketts

The problem here is not shoehorning dotted string metrics into Prometheus metrics, it's most likely Servo or some other library that's has a bug in how it's using spring boot metrics. See #130

I looked previously at micrometer, and continue to recommend using client_java for any Prometheus instrumentation needs.

brian-brazil avatar Aug 17 '17 05:08 brian-brazil