diff --git a/pkg/config/config.go b/pkg/config/config.go index 119b1a1a..fd77f587 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -120,7 +120,7 @@ func setupPrometheus() { Global.Prometheus.EvalCounter = promauto.NewCounterVec(prometheus.CounterOpts{ Name: "flagr_eval_results", Help: "A counter of eval results", - }, []string{"EntityType", "FlagID", "VariantID", "VariantKey"}) + }, []string{"EntityType", "FlagID", "FlagKey", "VariantID", "VariantKey"}) Global.Prometheus.RequestCounter = promauto.NewCounterVec(prometheus.CounterOpts{ Name: "flagr_requests_total", Help: "The total http requests received", diff --git a/pkg/handler/eval.go b/pkg/handler/eval.go index 3b7ed4f9..ce8c1a7c 100644 --- a/pkg/handler/eval.go +++ b/pkg/handler/eval.go @@ -248,6 +248,7 @@ var logEvalResultToPrometheus = func(r *models.EvalResult) { config.Global.Prometheus.EvalCounter.WithLabelValues( util.SafeStringWithDefault(r.EvalContext.EntityType, "null"), util.SafeStringWithDefault(r.FlagID, "null"), + util.SafeStringWithDefault(r.FlagKey, "null"), util.SafeStringWithDefault(r.VariantID, "null"), util.SafeStringWithDefault(r.VariantKey, "null"), ).Inc()