Turn off and remove method instrumentation
In https://gitlab.com/gitlab-org/gitlab/-/issues/122311, we're removing InfluxDB :tada: I thought this would also remove the method instrumentation code in https://gitlab.com/gitlab-org/gitlab/-/blob/master/config/initializers/zz_metrics.rb, as we only had these metrics in InfluxDB. However, @splattael correctly pointed out that we support those in Prometheus too: https://gitlab.com/gitlab-org/gitlab/-/blob/v12.10.0-ee/lib/gitlab/metrics/method_call.rb#L11 The reason these aren't on GitLab.com's metrics is because they're behind a feature flag, which is documented: https://docs.gitlab.com/ee/administration/monitoring/prometheus/gitlab_metrics.html#metrics-controlled-by-a-feature-flag This means that the code in the initializer still runs and potentially adds some overhead to these methods. I'd like us to: 1. Plan to remove this in 14.0. 2. For now, disable the instrumentation unless it's needed. I think we can do a feature flag check in an initializer (`config/initializers/sidekiq.rb` does one), but if not, maybe another way to remove this. 3. Measure the impact of disabling the instrumentation.
issue