From 190cd5d641fc1f2e5148349579ae4d409d441553 Mon Sep 17 00:00:00 2001 From: doccodyblue Date: Thu, 16 Sep 2021 11:06:57 +0200 Subject: [PATCH] Update metrics.py Replace spaces by underscores to prevent spaces from showing up in metrics token which causes scrape.go to crash --- owrx/metrics.py | 1 + 1 file changed, 1 insertion(+) diff --git a/owrx/metrics.py b/owrx/metrics.py index 6600e85..063bd5c 100644 --- a/owrx/metrics.py +++ b/owrx/metrics.py @@ -42,6 +42,7 @@ class Metrics(object): self.addMetric("openwebrx.users", DirectMetric(ClientRegistry.getSharedInstance().clientCount)) def addMetric(self, name, metric): + name = name.replace(' ','_') self.metrics[name] = metric def hasMetric(self, name):