Update metrics.py
Replace spaces by underscores to prevent spaces from showing up in metrics token which causes scrape.go to crash
This commit is contained in:
parent
3218e0b8aa
commit
190cd5d641
@ -42,6 +42,7 @@ class Metrics(object):
|
|||||||
self.addMetric("openwebrx.users", DirectMetric(ClientRegistry.getSharedInstance().clientCount))
|
self.addMetric("openwebrx.users", DirectMetric(ClientRegistry.getSharedInstance().clientCount))
|
||||||
|
|
||||||
def addMetric(self, name, metric):
|
def addMetric(self, name, metric):
|
||||||
|
name = name.replace(' ','_')
|
||||||
self.metrics[name] = metric
|
self.metrics[name] = metric
|
||||||
|
|
||||||
def hasMetric(self, name):
|
def hasMetric(self, name):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user