I need to sum two separate counter metrics capturing request failures to compute ratio of error requests for an alerting signal. The code initializing and setting these counters sits in separate modules preventing reuse of one counter.
The problem is when one of the counter is never incremented after a restart, service never exports the data point, prometheus will never get the time series and the summation will return nothing.
Is there a way to "force" publish a counter to 0 always on service reboot during counter initialization to avoid this problem?
(fail_count1 + fail_count2) / (total_count1 + total_count2)