From 10b6f369281a79bccaa75607d608a4a9c56b8d64 Mon Sep 17 00:00:00 2001 From: Flavien David Date: Thu, 23 May 2024 19:26:11 +0200 Subject: [PATCH] Ignore Qdrant metrics label (#5253) --- alerting/temporal/src/qdrant/index.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/alerting/temporal/src/qdrant/index.ts b/alerting/temporal/src/qdrant/index.ts index 899224d1b21e..efb6232c3fe0 100644 --- a/alerting/temporal/src/qdrant/index.ts +++ b/alerting/temporal/src/qdrant/index.ts @@ -60,7 +60,9 @@ async function fetchPrometheusMetrics( // Parse and update metric values. metricLines.forEach((line) => { - const [metricName, metricValue] = line.split(" "); + const [metricPart, metricValue] = line.split(" "); + // Extract metric name, ignoring any labels if present. + const [metricName] = metricPart.split("{", 1); const timestamp = Math.floor(Date.now() / 1000);