in v2/metrics/sender/types.go [122:136]
func (i *Informer) GetHealthCheckSuccessCount(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: "true",
}
if !common.HasLabels(m, labels) {
return
}
total += m.GetCounter().GetValue()
})
return total, nil
}