Skip to content

Use SSOT for checking if service ping is enabled via license or in application settings [RUN ALL RSPEC] [RUN AS-IF-FOSS]

What does this MR do?

It enabled Redis counters to track data even if only partial serivce ping reporting is enabled via license. Service Ping reporting is divided into two stages: tracking (recording metrics at instance level) and collection (reporting them to GitLab). This is MR is only about tracking stage. All permissions are checked again before collection.

Screenshots or Screencasts (strongly suggested)

How to setup and validate locally (strongly suggested)

  1. Either obtain license with customer service enabled or stub method response at ee/modesl/license.rb
--- a/ee/app/models/license.rb
+++ b/ee/app/models/license.rb
@@ -577,6 +577,7 @@ def cloud_license?

   def customer_service_enabled?
     !!license&.operational_metrics?
+    true
   end

   def license_type
  1. Disable Service Ping Screenshot_2021-07-29_at_10.49.34

  2. Check current state of SearchCounter

      Gitlab::UsageDataCounters::SearchCounter.read :all_searches
  3. Search any keyword in navbar Screenshot_2021-07-29_at_10.47.26

  4. Check again current sstate of SearchCounter

      Gitlab::UsageDataCounters::SearchCounter.read :all_searches

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Related to #337169 (closed)

Edited by Mikołaj Wawrzyniak

Merge request reports