SIENTIAPDE-1174
Update BaseActivity initialization in manager classes to enable error counter metric - Modified the initialization of DataManager, IngestorManager, OpcManager, and ResourceManager to include 'set_error_counter=True' for enhanced error tracking.
This commit is contained in:
@@ -97,7 +97,7 @@ class DataManager(BaseActivity):
|
|||||||
|
|
||||||
BaseActivity.__init__(self, logger=logger,
|
BaseActivity.__init__(self, logger=logger,
|
||||||
notification_handler=notification_handler,
|
notification_handler=notification_handler,
|
||||||
set_error_counter_metric=False)
|
set_error_counter=True)
|
||||||
|
|
||||||
def shutdown(self):
|
def shutdown(self):
|
||||||
"""Closes the Kafka producer connection."""
|
"""Closes the Kafka producer connection."""
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ class IngestorManager(BaseActivity):
|
|||||||
|
|
||||||
BaseActivity.__init__(self, logger=logger,
|
BaseActivity.__init__(self, logger=logger,
|
||||||
notification_handler=notification_handler,
|
notification_handler=notification_handler,
|
||||||
set_error_counter_metric=False)
|
set_error_counter=True)
|
||||||
|
|
||||||
def initialize_opc_from_config(self, server_config: dict) -> OpcManager | None:
|
def initialize_opc_from_config(self, server_config: dict) -> OpcManager | None:
|
||||||
"""
|
"""
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ class OpcManager(BaseActivity):
|
|||||||
|
|
||||||
BaseActivity.__init__(self, logger=logger,
|
BaseActivity.__init__(self, logger=logger,
|
||||||
notification_handler=notification_handler,
|
notification_handler=notification_handler,
|
||||||
set_error_counter_metric=False)
|
set_error_counter=True)
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return f"OpcManager(name={self.name}, url={self.url}, server_uri={self.server_uri})\n" \
|
return f"OpcManager(name={self.name}, url={self.url}, server_uri={self.server_uri})\n" \
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ class ResourceManager(BaseActivity):
|
|||||||
|
|
||||||
BaseActivity.__init__(self, logger=logger,
|
BaseActivity.__init__(self, logger=logger,
|
||||||
notification_handler=notification_handler,
|
notification_handler=notification_handler,
|
||||||
set_error_counter_metric=False)
|
set_error_counter=True)
|
||||||
|
|
||||||
def _execute_redis_op(self, operation_name: str, func, *args, **kwargs):
|
def _execute_redis_op(self, operation_name: str, func, *args, **kwargs):
|
||||||
"""Wrapper to execute Redis operations and record metrics."""
|
"""Wrapper to execute Redis operations and record metrics."""
|
||||||
|
|||||||
Reference in New Issue
Block a user