""" Model Manager Metrics Module This module defines all Prometheus metrics used by the Sientia DataOps Model Manager system for monitoring and observability. The metrics provide insights into system performance, training operations, and operational health. The metrics are designed to be scraped by Prometheus and can be visualized in Grafana or other monitoring dashboards to provide real-time visibility into the system's operation. Key Metric Categories: - Application Health: Overall system status and availability Metric Labels: - pod_id: Kubernetes pod identifier for multi-instance deployments """ from prometheus_client import Counter, Gauge # Application health metric APP_UP = Gauge( 'app_up', '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 )