Just like with rule exceptions, rule filters allow admin users to apply a Scorecard rule only to specific services. While individual users have to request exemptions when an entity is failing, rule filters are implemented when creating or editing a Scorecard. This will come in handy when a rule doesn’t apply to every entity or every group.
When setting up a filter, you can Restrict rule to specific groups by selecting relevant groups from Include or Exclude.
You can also create a rule filter by writing a custom CQL Query.
For example, say that our Cookiecutter repos don’t need to have SLOs set up properly, we can filter out that rule by applying a filter for the group “cookiecutter.”
When you return to the Scorecard rules with a filter applied, you’ll see that the rule is not included in the passing or failing list of rules for the relevant entities because it isn’t being evaluated.
Once a rule filter has been applied, you can still see it on a Scorecard’s home page. Navigate to the Rules tab and expand the rule to confirm it has been exempted. In the example below, you can see that services in cookiecutter are exempt from the Has SLOs set up rule.