File tree Expand file tree Collapse file tree 1 file changed +3
-0
lines changed
src/main/java/dev/vality/alerting/mayday/prometheus/client/k8s/util Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -33,6 +33,7 @@ public static UnaryOperator<PrometheusRule> getRemoveGroupByNameFunc(String grou
3333 public static UnaryOperator <PrometheusRule > getRemoveAlertByGroupAndNameFunc (String groupName ,
3434 String alertNameForRemoval ) {
3535 return prometheusRule -> {
36+ log .info ("Rule before removal: {}" , prometheusRule );
3637 log .info ("Going to remove alert '{}' for user '{}'" , alertNameForRemoval , groupName );
3738 var groups = prometheusRule .getSpec ().getGroups ();
3839 var groupIterator = groups .iterator ();
@@ -54,10 +55,12 @@ public static UnaryOperator<PrometheusRule> getRemoveAlertByGroupAndNameFunc(Str
5455 log .info ("User '{}'has no more rules and will be removed!" , group .getName ());
5556 groupIterator .remove ();
5657 }
58+ log .info ("Rule after removal: {}" , prometheusRule );
5759 return prometheusRule ;
5860 }
5961 }
6062 }
63+ log .info ("Nothing was removed: {}" , prometheusRule );
6164 return prometheusRule ;
6265 };
6366 }
You can’t perform that action at this time.
0 commit comments