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