From 776857a1b77ce437140d17b11d6b5fc82c380fc0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jose=20C=2E=20Mass=C3=B3n?= Date: Wed, 6 Mar 2024 15:05:37 -0300 Subject: [PATCH] use as_dict() because label_matcher_dict excludes unit --- lib/charms/grafana_agent/v0/cos_agent.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/charms/grafana_agent/v0/cos_agent.py b/lib/charms/grafana_agent/v0/cos_agent.py index 5e29f9d..2ff9a30 100644 --- a/lib/charms/grafana_agent/v0/cos_agent.py +++ b/lib/charms/grafana_agent/v0/cos_agent.py @@ -703,7 +703,7 @@ def metrics_jobs(self) -> List[Dict]: static_config["labels"] = { # Be sure to keep labels from static_config **static_config.get("labels", {}), - **topology.label_matcher_dict, + **topology.as_dict(excluded_keys=["charm_name"]), } scrape_jobs.append(job)