181
// totals are computed by the metrics backend by summing across the namespace tag.
182
// Used by the count-only scanners (StuckOpen, UnknownState).
183
>
func (a *Activities) runScan(ctx context.Context, subScanner, query, metricName string) error {
invariants.go
184
>
for _, nsName := range a.ListAllNamespaces() {
185
>
err := a.forEachNamespace(ctx, nsName, query, func(count int64) {
186
>
a.emitCount(metricName, nsName, count)
187
>
})
188
>
if err != nil {
189
a.recordScanError(nsName, subScanner, err)
190
continue
191
}
192
}
194
}
195