func()

in v2/metrics/processor/types.go [228:243]


func (i *Informer) GetHealthCheckSuccessCount(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:      "true",
		}
		if !common.HasLabels(m, labels) {
			return
		}
		total += m.GetCounter().GetValue()
	})
	return total, nil
}