prometheus-spring-boot-starter icon indicating copy to clipboard operation
prometheus-spring-boot-starter copied to clipboard

Eliminate duplicate values in metricFamilySamples

Open pkutschera opened this issue 7 years ago • 5 comments

Duplicate values are now removed from metrics before sending to prometheus, everything works fine for me now (spring boot 1.5.2 and prometheus 1.5.2

pkutschera avatar Apr 08 '17 22:04 pkutschera

@pkutschera I'm so sorry - for some reason I didn't notice your PR in a timely manner. I'll have a look at it the next weeks. Thank you very much for enhancing this project 👍

moelholm avatar Jul 16 '17 20:07 moelholm

@pkutschera The build is failing. Code depends on Guava. I would like to avoid further dependencies. Please modify code to not depend on additional libraries.

moelholm avatar Jul 16 '17 20:07 moelholm

Btw - could you please tell me exactly which values where duplicated ?

Just did a quick sanity check on my test case.... don't see any

moelholm avatar Jul 17 '17 16:07 moelholm

@moelholm I think that you only get duplicated metrics when you have something like netflix ribbon on your system. Ribbon load balancing system will duplicate some of the metrics.

For example:

# HELP counter_servo_loadbalancer_chooseserver counter_servo_loadbalancer_chooseserver
# TYPE counter_servo_loadbalancer_chooseserver gauge
counter_servo_loadbalancer_chooseserver 1.0
....
# HELP counter_servo_loadbalancer_chooseserver counter_servo_loadbalancer_chooseserver
# TYPE counter_servo_loadbalancer_chooseserver gauge
counter_servo_loadbalancer_chooseserver 0.0

filipepinheiro avatar Sep 20 '17 13:09 filipepinheiro

any progress on this PR ?

Vity01 avatar Oct 31 '17 11:10 Vity01