Commit f8e5122d authored by Bob Van Landuyt's avatar Bob Van Landuyt

Remove the rails_apdex_counters feature flag

This removes the feature flag after being enabled on GitLab.com for a
few weeks.

This will make the `gitlab_sli:rails_rquests_apdex:total` and
`gitlab_sli:rails_rquests_apdex:success_total` available for all
installations

Changelog: added
parent 9b7baf1f
---
name: request_apdex_counters
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/69154
rollout_issue_url: https://gitlab.com/gitlab-com/gl-infra/scalability/-/issues/1099
milestone: '14.3'
type: development
group: team::Scalability
default_enabled: false
......@@ -276,6 +276,8 @@ configuration option in `gitlab.yml`. These metrics are served from the
| `geo_uploads_synced` | Gauge | 14.1 | Number of uploads synced on secondary | `url` |
| `geo_uploads_failed` | Gauge | 14.1 | Number of syncable uploads failed to sync on secondary | `url` |
| `geo_uploads_registry` | Gauge | 14.1 | Number of uploads in the registry | `url` |
| `gitlab_sli:rails_request_apdex:total` | Counter | 14.4 | The number of request-apdex measurements, [more information the development documentation](../../../development/application_slis/rails_request_apdex.md) | `endpoint_id`, `feature_category`, `request_urgency` |
| `gitlab_sli:rails_request_apdex:success_total` | Counter | 14.4 | The number of succesful requests that met the target duration for their urgency. Devide by `gitlab_sli:rails_requests_apdex:total` to get a success ratio | `endpoint_id`, `feature_category`, `request_urgency` |
## Database load balancing metrics **(PREMIUM SELF)**
......
......@@ -4,12 +4,7 @@ module Gitlab
module Metrics
module RailsSlis
class << self
def request_apdex_counters_enabled?
Feature.enabled?(:request_apdex_counters)
end
def initialize_request_slis_if_needed!
return unless request_apdex_counters_enabled?
return if Gitlab::Metrics::Sli.initialized?(:rails_request_apdex)
Gitlab::Metrics::Sli.initialize_sli(:rails_request_apdex, possible_request_labels)
......
......@@ -79,7 +79,7 @@ module Gitlab
if !health_endpoint && ::Gitlab::Metrics.record_duration_for_status?(status)
self.class.http_request_duration_seconds.observe({ method: method }, elapsed)
record_apdex_if_needed(env, elapsed)
record_apdex(env, elapsed)
end
[status, headers, body]
......@@ -113,9 +113,7 @@ module Gitlab
::Gitlab::ApplicationContext.current_context_attribute(:caller_id)
end
def record_apdex_if_needed(env, elapsed)
return unless Gitlab::Metrics::RailsSlis.request_apdex_counters_enabled?
def record_apdex(env, elapsed)
urgency = urgency_for_env(env)
Gitlab::Metrics::RailsSlis.request_apdex.increment(
......
......@@ -39,15 +39,6 @@ RSpec.describe Gitlab::Metrics::RailsSlis do
described_class.initialize_request_slis_if_needed!
end
it 'does not initialize anything if the feature flag is disabled' do
stub_feature_flags(request_apdex_counters: false)
expect(Gitlab::Metrics::Sli).not_to receive(:initialize_sli)
expect(Gitlab::Metrics::Sli).not_to receive(:initialized?)
described_class.initialize_request_slis_if_needed!
end
end
describe '.request_apdex' do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment