SIENTIAPDE-1307: Implement metrics for training activities and workflow executions, tracking success/failure status.

This commit is contained in:
Bruno Domingues
2025-11-03 14:41:37 -03:00
parent d8e8d3c481
commit f32d647d1c
3 changed files with 83 additions and 1 deletions

View File

@@ -16,7 +16,7 @@ Metric Labels:
- pod_id: Kubernetes pod identifier for multi-instance deployments
"""
from prometheus_client import Gauge
from prometheus_client import Counter, Gauge
# Application health metric
APP_UP = Gauge(
@@ -24,3 +24,15 @@ APP_UP = Gauge(
'Indicates if the application is running (1) or shutting down (0)',
['pod_id'],
)
WORKFLOW_EXECUTION_TOTAL = Counter(
'model_manager_workflow_executions_total',
'Total number of workflow executions',
['pod_id', 'workflow_name', 'status'], # status: success, error
)
ACTIVITY_EXECUTION_TOTAL = Counter(
'model_manager_activity_executions_total',
'Total number of activity executions',
['pod_id', 'activity_name', 'status'], # status: success, error
)