Skip to content

Commit

Permalink
feat(labels): add "store" label with format "{store_name}@{cloud_name}"
Browse files Browse the repository at this point in the history
This should make it easier to build graphs where each unique store
within each cloud is separated out.
  • Loading branch information
jimehk committed May 20, 2024
1 parent 72037ce commit bac70ca
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions metrics/observe.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit bac70ca

Please sign in to comment.