From d0346fc30d9130d641e99b41229a533fa57d75f8 Mon Sep 17 00:00:00 2001 From: Mateusz Kulewicz Date: Tue, 8 Oct 2024 14:26:27 +0200 Subject: [PATCH] Add LogForwarder to coordinator --- pyproject.toml | 2 +- src/cosl/coordinated_workers/coordinator.py | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 2430ab0..974c92e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "hatchling.build" [project] name = "cosl" -version = "0.0.40" +version = "0.0.41" authors = [ { name="sed-i", email="82407168+sed-i@users.noreply.github.com" }, ] diff --git a/src/cosl/coordinated_workers/coordinator.py b/src/cosl/coordinated_workers/coordinator.py index 76d6296..33dfda3 100644 --- a/src/cosl/coordinated_workers/coordinator.py +++ b/src/cosl/coordinated_workers/coordinator.py @@ -40,6 +40,8 @@ ) from cosl.helpers import check_libs_installed +from lib.charms.loki_k8s.v1.loki_push_api import LogForwarder + check_libs_installed( "charms.data_platform_libs.v0.s3", "charms.grafana_k8s.v0.grafana_source", @@ -283,6 +285,7 @@ def __init__( ) self._logging = LokiPushApiConsumer(self._charm, relation_name=self._endpoints["logging"]) + self._log_forwarder = LogForwarder(self._charm, relation_name=self._endpoints["logging"]) # Provide ability for this to be scraped by Prometheus using prometheus_scrape refresh_events = [self._charm.on.update_status, self.cluster.on.changed]