From 37a31a51a47f40560bfdecdbc06ea71f7c17bb07 Mon Sep 17 00:00:00 2001 From: vitor-aignosi Date: Mon, 18 Aug 2025 14:17:43 -0300 Subject: [PATCH] SIENTIAPDE-1169 Refactor OPC metrics to use unpacking for CORE_LABELS in metrics.py - Updated the definition of prediction OPC writing metrics to utilize unpacking for CORE_LABELS, enhancing code clarity and maintainability. --- laborious/metrics.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/laborious/metrics.py b/laborious/metrics.py index 9d422fb..796e159 100644 --- a/laborious/metrics.py +++ b/laborious/metrics.py @@ -30,12 +30,12 @@ PREDICTION_RESPONSE_TIME_MONITOR = Histogram( PREDICTION_OPC_WRITING_COUNT = Counter( "laborious_prediction_opc_writing_count", "Number of predictions written to the OPC server", - [CORE_LABELS, "opc_server_id"], + [*CORE_LABELS, "opc_server_id"], ) PREDICTION_OPC_WRITING_RESPONSE_TIME_MONITOR = Histogram( "laborious_prediction_opc_writing_response_time_monitor", "Current response time of each prediction written to the OPC server", - [CORE_LABELS, "opc_server_id"], + [*CORE_LABELS, "opc_server_id"], buckets=[0.01, 0.05, 0.1, 0.2, 0.5, 1.0, 2.0, 5.0, 10.0] )