incrementCounter static method
Increments a counter metric.
Implementation
static void incrementCounter(String name, {Map<String, String>? tags}) {
if (!_enabled) return;
final key = _keyWithTags(name, tags);
_counters[key] = (_counters[key] ?? 0) + 1;
record(
Metric(
name: name,
type: MetricType.counter,
value: _counters[key]!,
tags: tags,
),
);
}