feat: record a component aggregation set from sli_aggregations
feat: generate the component aggregation in Mimir
This is the first iteration of generating a component aggregationset in Mimir. This should start populating the operation rates so they would become visible on dashboards.
To achieve this, while keeping the existing implementation in
Prometheus and Thanos intact, we allow overriding the recording rule
configuration for Mimir. While keeping the defaults in the
get-hybrid
and the current recording rule configuration. The global
default configuration lives in
gitlabMetricsConfig.recordingRuleRegistry
and we default to the
selectiveRegistry
.
The selectiveRegistry
is the recording rule registry that only adds
recording rules for metrics specified in a recordingRuleMetrics
stanza on a service.
In mimir-rules-jsonnet/mimir-aggregations.jsonnet
, the file
responsible for generating recording rules from source metrics into an
aggregation set. We specify the new unifiedRegistry
.
The unifiedRegistry
adds recording rules for all metrics used in
SLIs of a service, and it records this per service. This was added in
!6711 (merged) and
slightly refactored here to make it usable in the same way as the old
selectiveRegistry
. The recording rules for the selectiveRegistry
aren't adjusted in this MR. We're only adding new ones for the
component aggregation.
Missing in this MR:
- Upscaling longer burn rates for aggregation sets, we'll do this in gitlab-com/gl-infra/scalability#2898 (closed)
- Recording ratios from self in the aggregation sets: the get-hybrid currently does this using reflected rule groups. We'll do this in gitlab-com/gl-infra/scalability#2899 (closed)
- Recording a component mapping (gitlab-com/gl-infra/scalability#2900 (closed))
This is part of gitlab-com/gl-infra/scalability#2475 (closed)
feat: add the monitor: 'global' static label to mimir
This is a bit of a hack to have the same label on our aggregations in mimir so we don't need to change the config of our dashboards when we switch datasources.