We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents b48406c + 27648d1 commit 1fc8cc7Copy full SHA for 1fc8cc7
pghoard/monitoring/prometheus.py
@@ -38,8 +38,8 @@ def get_metrics(self):
38
def _update(self, metric, value, tags):
39
ts = str(int(time.time())) + "000"
40
41
- metric = metric.replace(".", "_")
42
- tags = {**self._tags, **tags}
+ metric = metric.replace(".", "_").replace("-", "_")
+ tags = {**self._tags, **tags} if tags else {**self._tags}
43
tag_list = []
44
for k in sorted(tags.keys()):
45
tag_list.append("{}=\"{}\"".format(k, tags[k]))
0 commit comments