+ def _build_headers(self) -> Dict[str, str]:
+ headers = {}
+ user = self.conf.get("prometheus", "user")
+ password = self.conf.get("prometheus", "password")
+ if user and password:
+ _phrase = f"{user}:{password}".encode("utf-8")
+ token = base64.b64encode(_phrase).decode("utf-8")
+ headers["Authorization"] = f"Basic {token}"
+ return headers
+