Update replica count in values.yaml, add application status metrics in metrics.py, and implement Prometheus server in worker.py for enhanced observability.
22 lines
529 B
Python
22 lines
529 B
Python
from prometheus_client import Gauge, Counter
|
|
|
|
APP_UP = Gauge(
|
|
"app_up",
|
|
"Indicates if the application is running (1) or shutting down (0)",
|
|
["pod_id"],
|
|
)
|
|
|
|
CORE_LABELS = ["pod_id", "model_name", "pipeline_name"]
|
|
|
|
LABORIOUS_DATA_WRITTEN_COUNT = Counter(
|
|
"scouter_laborious_data_written_count",
|
|
"Number of writings to the database table laborious_data",
|
|
CORE_LABELS,
|
|
)
|
|
|
|
TAG_CHANGES_MONITOR = Gauge(
|
|
"scouter_tag_changes_monitor",
|
|
"Current value change of each tag",
|
|
[*CORE_LABELS, "tag_name"],
|
|
)
|