Skip to content

Remove "name" field from Metric Definition

What does this MR do and why?

This is one of several MRs to remove name from metric definitions. See: #411602 (closed)

This MR removes the names from all existing metric definitions.

I used the following script (remove_name.sh) to modify the metric definitions:

for directory in "$@"; do
  for file in "$directory"/*; do
    if [ -f "$file" ]; then
      sed '/^name:/d' "$file" > "$file.tmp"
      mv "$file.tmp" "$file"
    fi
  done
done

To run it: bash remove_name.sh config/metrics/counts_* ee/config/metrics/counts_*

How to set up and validate locally

To validate that all relevant metric definitions has been updated, run grep "name:" config/metrics/counts_*/* ee/config/metrics/counts_*/*.

You can run the same command on master to see the difference.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #411602 (closed)

Edited by Jonas Larsen

Merge request reports