refactor(metrics): preparation for aggregation sets

Prerequisite for !3068 (merged).

This MR is a yakshaving exercise. The intention is to move shuffle some files around, moving them into the locations they will be in !3068 (merged), reducing churn in that MR.

There are no functional changes in this MR.

As confirmation, I used the following script to ensure that the Thanos recording rules before and after this change have parity:

$ (for i in *.yml; do ruby -ryaml -rjson -e "puts YAML.load(ARGF.read).to_json" $i|jq -r '.groups[]|.rules[]|.record?|select(.!=null)'; done)|sort|uniq -c  > post-thanos-rules.txt
$ git checkout master
$ (for i in *.yml; do ruby -ryaml -rjson -e "puts YAML.load(ARGF.read).to_json" $i|jq -r '.groups[]|.rules[]|.record?|select(.!=null)'; done)|sort|uniq -c  > pre-thanos-rules.txt
$ diff pre-thanos-rules.txt post-thanos-rules.txt
# No changes
$

This script confirms that we have the same set of recording rules.

Edited by Andrew Newdigate

Merge request reports

Loading