diff options
Diffstat (limited to 'lib/gitlab')
-rw-r--r-- | lib/gitlab/analytics/unique_visits.rb | 8 | ||||
-rw-r--r-- | lib/gitlab/usage_data.rb | 11 |
2 files changed, 1 insertions, 18 deletions
diff --git a/lib/gitlab/analytics/unique_visits.rb b/lib/gitlab/analytics/unique_visits.rb index 3546a7e3ddb..7fcfe60a3e7 100644 --- a/lib/gitlab/analytics/unique_visits.rb +++ b/lib/gitlab/analytics/unique_visits.rb @@ -10,9 +10,7 @@ module Gitlab # @param [ActiveSupport::TimeWithZone] end_date end of time frame # @return [Integer] number of unique visitors def unique_visits_for(targets:, start_date: 7.days.ago, end_date: start_date + 1.week) - events = if targets == :analytics - self.class.analytics_events - elsif targets == :compliance + events = if targets == :compliance self.class.compliance_events else Array(targets) @@ -22,10 +20,6 @@ module Gitlab end class << self - def analytics_events - Gitlab::UsageDataCounters::HLLRedisCounter.events_for_category('analytics') - end - def compliance_events Gitlab::UsageDataCounters::HLLRedisCounter.events_for_category('compliance') end diff --git a/lib/gitlab/usage_data.rb b/lib/gitlab/usage_data.rb index f86394971e7..f623e207fb9 100644 --- a/lib/gitlab/usage_data.rb +++ b/lib/gitlab/usage_data.rb @@ -643,16 +643,6 @@ module Gitlab } end - def analytics_unique_visits_data - results = ::Gitlab::Analytics::UniqueVisits.analytics_events.each_with_object({}) do |target, hash| - hash[target] = redis_usage_data { unique_visit_service.unique_visits_for(targets: target) } - end - results['analytics_unique_visits_for_any_target'] = redis_usage_data { unique_visit_service.unique_visits_for(targets: :analytics) } - results['analytics_unique_visits_for_any_target_monthly'] = redis_usage_data { unique_visit_service.unique_visits_for(targets: :analytics, **monthly_time_range) } - - { analytics_unique_visits: results } - end - def compliance_unique_visits_data results = ::Gitlab::Analytics::UniqueVisits.compliance_events.each_with_object({}) do |target, hash| hash[target] = redis_usage_data { unique_visit_service.unique_visits_for(targets: target) } @@ -710,7 +700,6 @@ module Gitlab .merge(topology_usage_data) .merge(usage_activity_by_stage) .merge(usage_activity_by_stage(:usage_activity_by_stage_monthly, monthly_time_range_db_params)) - .merge(analytics_unique_visits_data) .merge(compliance_unique_visits_data) .merge(redis_hll_counters) .deep_merge(aggregated_metrics_data) |