Reimplement/revert "monitoring: By default show instance name instead of "value" (#14662)"
Created by: slimsag
This addresses my comment https://github.com/sourcegraph/sourcegraph/pull/14662/files#r504162488
I first reverted 1b681b9 but then re-added the identical Repo Updater dashboard change @ryanslade had after that PR (just reverting felt rude, so I wanted to make sure the same functionality was kept.)
I added inline docs to clarify why having the default LegendFormat be "value" is important to prevent others from shooting themselves in the foot so-to-speak.
Note that I am not sure that you actually really do want .LegendFormat("{{instance}}")
in the repo-updater dashboard (not sure there can be multiple repo-updater instances, and I think the problem where you were seeing duplicate seconds
came from a different prometheus label not from {{instance}}
so I'm pretty sure you will just see duplicate {{instance}}
labels after your PR/this PR. I think what you want is probably something like max by (instance)(...)
wrapping your queries, or to use a different {{label}}
in the legend format - the one actually introducing the cardinality - so that it doesn't appear as duplicates in Grafana. Happy to provide more help here if this is unclear.