From ab4f2e8417410511f084da2de4127f0a3c54192d Mon Sep 17 00:00:00 2001 From: Parichay Pothepalli Date: Mon, 1 Jul 2024 16:08:34 -0400 Subject: [PATCH] Included additional metrics to be exposed --- slo_generator/exporters/base.py | 6 ++++++ slo_generator/report.py | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/slo_generator/exporters/base.py b/slo_generator/exporters/base.py index 882be59c..524de7ae 100644 --- a/slo_generator/exporters/base.py +++ b/slo_generator/exporters/base.py @@ -29,6 +29,7 @@ "feature_name", "slo_name", "metadata", + "error_budget_minutes", ] # Default metrics that are exported by metrics exporters. @@ -58,6 +59,11 @@ "description": "Service Level Objective target.", "labels": DEFAULT_METRIC_LABELS, }, + { + "name": "error_budget_minutes", + "description": "Service Level Objective target.", + "labels": DEFAULT_METRIC_LABELS, + }, ] diff --git a/slo_generator/report.py b/slo_generator/report.py index 0a754393..265567b8 100644 --- a/slo_generator/report.py +++ b/slo_generator/report.py @@ -405,7 +405,8 @@ def __str__(self) -> str: "BR: {error_budget_burn_rate:<2} / " "{error_budget_burn_rate_threshold} | " "Alert: {alert:<1} | Good: {good_events_count:<8} | " - "Bad: {bad_events_count:<8}" + "Bad: {bad_events_count:<8} | " + "Remaining Minutes:{error_budget_remaining_minutes:<8} | Error Minutes : {error_minutes:<8} | " ).format_map(report) full_str = f"{self.info} | {sli_str} | {result_str}" if COLORED_OUTPUT == 1: