Hi there!

I am trying to build a few set of metrics for the health information of my 
Spring Boot Application (it has the Actuator framework as the metrics 
aggregator).
At first, I have tried to implement a gauge metric, intercepting the result 
of all health checks that my app does. When I saw the result, the metrics 
appeared to be static, even though I was setting it to 1 and -1, depending 
on the UP and DOWN information.
Because of that, I tried to implement a summary metric, but when I tried to 
put those info into a Grafana Dashboard, it was getting really difficult to 
achieve what I was intending to.

That said, I have two questions:
1. Am I trying to do something wrong, considering a gauge metric like a 
"boolean" metric? Because is exactly that that I wish to achieve in the end.
2. What am I doing wrong, so that the metric kept its first value set?

Here is the snippet of the code:

*meterRegistry.gauge("health_state", tagsHealth, 
healthResponse.getStatus().equals(Status.UP) ? 1 : -1)*

I tried to use other constructors, but the result was the same. With the 
Gauge API, I was getting another error.

Has anyone received the same error or a similar one?

*Important info:*
*Java Version:* 12
*Spring Boot Version:* 2.3.4.RELEASE

Thanks in advance.

-- 
You received this message because you are subscribed to the Google Groups 
"Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/88126b94-be61-4ad1-8c0e-b7af428c2040n%40googlegroups.com.

Reply via email to