stats: fix prometheus label quoting
This commit is contained in:
parent
ef6fe53402
commit
be7c7891bd
@ -28,8 +28,8 @@ class MetricPrinter:
|
||||
self._now_str = ""
|
||||
labels = []
|
||||
if self.args.instance:
|
||||
labels.append(f"instance={self.args.instance!r}")
|
||||
labels.append(f"interface={self.args.interface!r}")
|
||||
labels.append(f"instance=\"{self.args.instance}\"")
|
||||
labels.append(f"interface=\"{self.args.interface}\"")
|
||||
self._label_str = "{" + ",".join(labels) + "}"
|
||||
|
||||
def print_metric(self, *, name: str, mtype: str, value: typing.Any, help: str | None = None):
|
||||
|
Loading…
Reference in New Issue
Block a user