in v2/metrics/sender/types.go [139:153]
func (i *Informer) GetHealthCheckFailureCount(namespace, entity string) (float64, error) {
var total float64
common.Collect(i.registry.HealthCheckCount, func(m *dto.Metric) {
labels := map[string]string{
namespaceLabel: namespace,
entityLabel: entity,
successLabel: "false",
}
if !common.HasLabels(m, labels) {
return
}
total += m.GetCounter().GetValue()
})
return total, nil
}