From 9fb2862d3c5320e6a23122b12e19a3417f2f6ee8 Mon Sep 17 00:00:00 2001 From: vitor-aignosi Date: Mon, 4 Aug 2025 15:02:55 -0300 Subject: [PATCH] SIENTIAPDE-1174 Update BaseActivity initialization in manager classes to disable error counter metric - Modified the initialization of DataManager, IngestorManager, OpcManager, and ResourceManager to include 'set_error_counter_metric=False' for improved error handling. --- ingestor/managers/data_manager.py | 3 ++- ingestor/managers/ingestor_manager.py | 3 ++- ingestor/managers/opc_manager.py | 3 ++- ingestor/managers/resource_manager.py | 3 ++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/ingestor/managers/data_manager.py b/ingestor/managers/data_manager.py index 903daf0..4984682 100644 --- a/ingestor/managers/data_manager.py +++ b/ingestor/managers/data_manager.py @@ -96,7 +96,8 @@ class DataManager(BaseActivity): ) BaseActivity.__init__(self, logger=logger, - notification_handler=notification_handler) + notification_handler=notification_handler, + set_error_counter_metric=False) def shutdown(self): """Closes the Kafka producer connection.""" diff --git a/ingestor/managers/ingestor_manager.py b/ingestor/managers/ingestor_manager.py index 47499fd..879531c 100644 --- a/ingestor/managers/ingestor_manager.py +++ b/ingestor/managers/ingestor_manager.py @@ -56,7 +56,8 @@ class IngestorManager(BaseActivity): self.metadata = metadata BaseActivity.__init__(self, logger=logger, - notification_handler=notification_handler) + notification_handler=notification_handler, + set_error_counter_metric=False) def initialize_opc_from_config(self, server_config: dict) -> OpcManager | None: """ diff --git a/ingestor/managers/opc_manager.py b/ingestor/managers/opc_manager.py index cdf37b6..3e32e2e 100644 --- a/ingestor/managers/opc_manager.py +++ b/ingestor/managers/opc_manager.py @@ -35,7 +35,8 @@ class OpcManager(BaseActivity): pod_id=self.pod_id, server_name=self.name).set(0) BaseActivity.__init__(self, logger=logger, - notification_handler=notification_handler) + notification_handler=notification_handler, + set_error_counter_metric=False) def __str__(self): return f"OpcManager(name={self.name}, url={self.url}, server_uri={self.server_uri})\n" \ diff --git a/ingestor/managers/resource_manager.py b/ingestor/managers/resource_manager.py index 9dc3ddc..bee722d 100644 --- a/ingestor/managers/resource_manager.py +++ b/ingestor/managers/resource_manager.py @@ -44,7 +44,8 @@ class ResourceManager(BaseActivity): self.metadata = metadata BaseActivity.__init__(self, logger=logger, - notification_handler=notification_handler) + notification_handler=notification_handler, + set_error_counter_metric=False) def _execute_redis_op(self, operation_name: str, func, *args, **kwargs): """Wrapper to execute Redis operations and record metrics."""