from prometheus_client import Counter, Gauge, Histogram from sientia_do.observability.metrics import CORE_LABELS as SIENTIA_CORE_LABELS # Application health and status metrics APP_UP = Gauge( 'app_up', 'Indicates if the application is running (1) or shutting down (0)', ['pod_id'], ) # Core labels for consistent metric labeling CORE_LABELS = ['pod_id', 'model_name', 'workflow_name'] # Data processing metrics LABORIOUS_DATA_WRITTEN_COUNT = Counter( 'scouter_laborious_data_written_count', 'Number of writings to the database table laborious_data', CORE_LABELS, ) # Tag monitoring metrics TAG_CHANGES_MONITOR = Gauge( 'scouter_tag_changes_monitor', 'Current value change of each tag', [*CORE_LABELS, 'tag_name'], ) # Generic REST client metrics GENERIC_REST_CLIENT_LAG = Histogram( 'scouter_generic_rest_client_lag', 'Lag time for a request to a generic REST client', SIENTIA_CORE_LABELS, ) GENERIC_REST_READ_COUNT = Counter( 'scouter_generic_rest_client_read_count', 'Number of reads from a generic REST client', SIENTIA_CORE_LABELS, ) GENERIC_REST_READ_ERROR_COUNT = Counter( 'scouter_generic_rest_client_read_error_count', 'Number of read errors from a generic REST client', SIENTIA_CORE_LABELS, )