Skip to content

Commit

Permalink
fix(metrics): vault_injector_store_data_count_success was not cleaned… (
Browse files Browse the repository at this point in the history
#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
  • Loading branch information
SoulKyu authored Jul 29, 2024
1 parent 79d4f34 commit 147d02d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/prometheus/prom.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ var (
Name: "vault_injector_store_data_count_success",
Help: "Vault injector data stored with success",
},
[]string{"uuid", "namespace"},
[]string{},
)
DataErrorStoredCount = prometheus.NewCounterVec(
prometheus.CounterOpts{
Expand Down
2 changes: 1 addition & 1 deletion pkg/vault/handle_token.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ func (c *Connector) StoreData(ctx context.Context, vaultInformation *KeyInformat
return "Error !", err
}

promInjector.DataStoredCount.WithLabelValues(uuid, namespace).Inc()
promInjector.DataStoredCount.WithLabelValues().Inc()
return "Success !", nil
}

Expand Down

0 comments on commit 147d02d

Please sign in to comment.