Skip to content
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ public class MicrometerMetricsV2 implements Metrics {

public static final String RECONCILIATION_EXECUTION_DURATION =
RECONCILIATIONS + "execution.duration";
public static final String NO_NAMESPACE = "NO_NAMESPACE";
public static final String UNKNOWN_ACTION = "UNKNOWN";

private final MeterRegistry registry;
private final Map<String, AtomicInteger> gauges = new ConcurrentHashMap<>();
Expand Down Expand Up @@ -176,7 +178,11 @@ public void eventReceived(Event event, Map<String, Object> metadata) {
Tag.of(ACTION, resourceEvent.getAction().toString()));
} else {
incrementCounter(
EVENTS_RECEIVED, null, metadata, Tag.of(EVENT, event.getClass().getSimpleName()));
EVENTS_RECEIVED,
null,
metadata,
Tag.of(EVENT, event.getClass().getSimpleName()),
Tag.of(ACTION, UNKNOWN_ACTION));
}
}

Expand Down Expand Up @@ -246,6 +252,8 @@ private static void addControllerNameTag(String name, List<Tag> tags) {
private void addNamespaceTag(String namespace, List<Tag> tags) {
if (includeNamespaceTag && namespace != null && !namespace.isBlank()) {
addTag(NAMESPACE, namespace, tags);
} else {
addTag(NAMESPACE, NO_NAMESPACE, tags);
}
}

Expand Down
Loading