From bac70cafe3fc2ad89fe57921fbf29976a54fa996 Mon Sep 17 00:00:00 2001 From: Jim Myhrberg Date: Mon, 20 May 2024 11:00:51 +0100 Subject: [PATCH] feat(labels): add "store" label with format "{store_name}@{cloud_name}" This should make it easier to build graphs where each unique store within each cloud is separated out. --- metrics/observe.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/metrics/observe.go b/metrics/observe.go index 553426d..a86743a 100644 --- a/metrics/observe.go +++ b/metrics/observe.go @@ -62,12 +62,14 @@ func (sm *StorageMetrics) observeStores( for _, ssc := range stores { store := ssc.Store policies := ssc.Policies + storeAttr := attribute.String("store", store.Name+"@"+target.CloudName) storeNameAttr := attribute.String("store_name", store.Name) storeLevelAttrs := metric.WithAttributes( targeNameAttr, cloudNameAttr, storeNameAttr, + storeAttr, ) o.ObserveInt64(sm.AccountsCount, store.AccountsCount, storeLevelAttrs)