Problem
nais_api_watcher_resources only has type and action attributes. We cannot filter or group resource counts by cluster in dashboards.
Suggestion
The cluster string is already available in add(), remove(), and update() in internal/kubernetes/watcher/watcher.go — just pass it as an attribute:
w.resourceCounter.Add(context.TODO(), 1, metric.WithAttributes(
attribute.String("type", w.watchedType),
attribute.String("action", "add"),
attribute.String("cluster", cluster), // <-- add this
))
Same change in remove() and update().
Why
This enables tenant dashboards to show per-cluster resource adoption (apps, topics, CloudSQL, buckets, valkey, opensearch) without needing a separate query per cluster.
Problem
nais_api_watcher_resourcesonly hastypeandactionattributes. We cannot filter or group resource counts by cluster in dashboards.Suggestion
The
clusterstring is already available inadd(),remove(), andupdate()ininternal/kubernetes/watcher/watcher.go— just pass it as an attribute:Same change in
remove()andupdate().Why
This enables tenant dashboards to show per-cluster resource adoption (apps, topics, CloudSQL, buckets, valkey, opensearch) without needing a separate query per cluster.