SIENTIAPDE-1316
Update .gitignore and refactor metrics.py, activities.py, and gates.py for improved clarity and consistency. Added coverage.xml and cache directories to .gitignore. Standardized string formatting and parameter handling in metrics and activities classes, enhancing code readability. Removed the deprecated faker.py file and adjusted related tests accordingly.
This commit is contained in:
@@ -1,25 +1,25 @@
|
||||
from prometheus_client import Gauge, Counter
|
||||
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"],
|
||||
'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", "pipeline_name"]
|
||||
CORE_LABELS = ['pod_id', 'model_name', 'pipeline_name']
|
||||
|
||||
# Data processing metrics
|
||||
LABORIOUS_DATA_WRITTEN_COUNT = Counter(
|
||||
"scouter_laborious_data_written_count",
|
||||
"Number of writings to the database table laborious_data",
|
||||
'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"],
|
||||
'scouter_tag_changes_monitor',
|
||||
'Current value change of each tag',
|
||||
[*CORE_LABELS, 'tag_name'],
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user