From c73aebd88482536f0e476d156f94e68fb3d47b63 Mon Sep 17 00:00:00 2001 From: "jo.perez" <jo.perez@criteo.com> Date: Thu, 2 Jun 2022 14:11:55 +0200 Subject: [PATCH] feat: add cypherQuery as a label in the metrics - Adds the cypher query as a label of the execution time observation. --- internal/knowledge/querier.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/knowledge/querier.go b/internal/knowledge/querier.go index d216d08..f49d235 100644 --- a/internal/knowledge/querier.go +++ b/internal/knowledge/querier.go @@ -78,7 +78,7 @@ func (q *Querier) queryInternal(ctx context.Context, cypherQuery string) (*Queri logrus.Debugf("Found results in %s", s.Execution) metrics.GraphQueryTimeExecution. - WithLabelValues().Observe(float64(executionTime)) + WithLabelValues(cypherQuery).Observe(float64(executionTime)) result := &QuerierResult{ Cursor: res.Cursor,