**What this PR does / why we need it**:
Some end-users can impose great workload on a cluster by selecting too
many streams in their queries. We should be able to limit them.
Therefore we introduce a new limit `RequiredLabelMatchers` which list
label names that must be included in the stream selectors.
The implementation follows the same approach as for max query limit.
**Which issue(s) this PR fixes**:
Fixes#8745
**Checklist**
- [ ] Reviewed the
[`CONTRIBUTING.md`](https://github.com/grafana/loki/blob/main/CONTRIBUTING.md)
guide (**required**)
- [x] Documentation added
- [x] Tests updated
- [x] `CHANGELOG.md` updated
- [ ] Changes that require user attention or interaction to upgrade are
documented in `docs/sources/upgrading/_index.md`
{`count_over_time({app="foo"}[1m]) / count_over_time({pod="bar"}[1m] offset 1m)`,"stream selector is missing required matchers [app], labels present in the query were [pod]",nil},
{`avg(count_over_time({pod=~"foo|bar"} |~".+bar" [1m]))`,"stream selector is missing required matchers [app], labels present in the query were [pod]",nil},
{`{app="foo", pod="bar"}`,noErr,streams},
{`{pod="bar"} |= "foo" |~ ".+bar"`,"stream selector is missing required matchers [app], labels present in the query were [pod]",nil},
RequiredLabels[]string`yaml:"required_label_matchers,omitempty" json:"required_label_matchers,omitempty" doc:"description=Define a list of required selector labels."`