client_java icon indicating copy to clipboard operation
client_java copied to clipboard

Counter metric doesn't report when running application using jar

Open anilkonduru opened this issue 4 years ago • 1 comments
trafficstars

I am running my spring batch application as java -cp myapp.jar with option --spring.main.web-application-type=NONE.

The counter metric doesn't get reported when executing counter.labels(JOB_COMPLETED).inc();

The jar execution is a separate process from main application and runs on different port than 8080. Appreciate any help.

anilkonduru avatar Apr 04 '21 01:04 anilkonduru

Hi anilkonduru, I need some more information to answer this. How do you create the counter, and how do you expose the Prometheus metrics?

fstab avatar Apr 07 '21 20:04 fstab