Skip to content

Commit 147d02d

Browse files
authored
fix(metrics): vault_injector_store_data_count_success was not cleaned… (#24)
* fix(metrics): vault_injector_store_data_count_success was not cleaned up when pod is deleted by the renewer * fix(metrics): remove labels as it occure to too many metrics on prometheus / endpoints
1 parent 79d4f34 commit 147d02d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

pkg/prometheus/prom.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ var (
125125
Name: "vault_injector_store_data_count_success",
126126
Help: "Vault injector data stored with success",
127127
},
128-
[]string{"uuid", "namespace"},
128+
[]string{},
129129
)
130130
DataErrorStoredCount = prometheus.NewCounterVec(
131131
prometheus.CounterOpts{

pkg/vault/handle_token.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ func (c *Connector) StoreData(ctx context.Context, vaultInformation *KeyInformat
6363
return "Error !", err
6464
}
6565

66-
promInjector.DataStoredCount.WithLabelValues(uuid, namespace).Inc()
66+
promInjector.DataStoredCount.WithLabelValues().Inc()
6767
return "Success !", nil
6868
}
6969

0 commit comments

Comments
 (0)