Make sure that incompatible labelsets for SLIs between initialization and execution don't cause errors
This ticket was created from INC-348 and was automatically exported by incident.io
In this incident occured after we merged gitlab-org/gitlab!184507 (merged), in which we made sure that SLIs were correctly initialized again. We did not notice that the metrics emitted used a slightly different labelset: the apdex-sli did not pass an error_type="" label which made the endpoint fail at runtime. We did not catch this in tests, even thought he SLIs are tested, because the initializers don't run in tests.
The error that was raised was this one from prometheus-client-mmap: https://gitlab.com/gitlab-org/ruby/gems/prometheus-client-mmap/-/blob/7a2dff5bee7a98420a56c9cc320a88d68756e8c8/lib/prometheus/client/label_set_validator.rb#L38-40
In the fix MR, we added a spec that explicitly enables the SLIs that concern the particular endpoint we're talking about: gitlab-org/gitlab!186061 (merged). We should make sure that this is the case for all controller and request specs, but only run the initialization once per suite. We should also make sure that this plays nicely with the :prometheus spec helper that specs use to ensure they have predictable data inside prometheus for a spec.