Improve Application SLI framework to avoid misinterpretation of prometheus labels required
As of now, required Prometheus labels aren't enforced when incrementing counters. The fact of passing an array of labels can be error-prone, since the counters required the same set of labels to be passed on, leading to bugs such as gitlab-org/gitlab!106163 (comment 1199779926). More details in Sentry: https://sentry.gitlab.net/gitlab/staginggitlabcom/issues/4058278/
We need to improve the implementation design to avoid misuse and/or fail earlier
Proposal
Remember the possible label names that were used when initializing an SLI. Then fail in development when incrementing a metric when not everything was passed.
Edited by Bob Van Landuyt