Files
sientia-dataops-scouter_tem…/scouter/metrics.py
vitor-aignosi f2b648ead2 SIENTIAPDE-1478
Refactor metrics and imports across multiple files

- Removed unused import of CORE_LABELS in metrics.py.
- Updated import statements in api.py for consistency.
- Cleaned up import order in worker.py for better readability.
- Added missing newline at the end of metrics.py.
- Adjusted formatting in core_scouter.py to ensure proper syntax.
- Removed redundant 'on_conflict' and 'unique_columns' keys from test cases in test_core_scouter.py for clarity.
2026-01-08 16:20:10 -03:00

26 lines
665 B
Python

from prometheus_client import Counter, Gauge
# 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'],
)