Commit c6c3d592 authored by charlie ablett's avatar charlie ablett

Merge branch 'bvl-remove-apdex-counters-ff' into 'master'

Remove the rails_request_apdex_counters feature flag

See merge request gitlab-org/gitlab!72427
parents eb78edda f8e5122d
---
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