Commit 22c0c91c authored by Bob Van Landuyt's avatar Bob Van Landuyt

Remove dependency_list usage counter

This counter counting usage by project, resulting in an ever growing
set in Redis as the feature gains adoption.

This data wasn't useful, while still consuming a relatively high
amount of memory, so we removed it.

A better approach would be using Redis HLL counters for this.
parent af5839be
......@@ -18,8 +18,6 @@ module Projects
render status: :ok
end
format.json do
::Gitlab::UsageCounters::DependencyList.increment(project.id)
render json: serializer.represent(dependencies, build: report_service.build)
end
end
......
......@@ -7,7 +7,7 @@ product_stage: secure
product_group: group::composition analysis
product_category: dependency_scanning
value_type: number
status: active
status: removed
time_frame: all
data_source: redis
distribution:
......
......@@ -201,7 +201,6 @@ module EE
usage_data[:counts].merge!(
{
confidential_epics: count(::Epic.confidential),
dependency_list_usages_total: redis_usage_data { ::Gitlab::UsageCounters::DependencyList.usage_totals[:total] },
epics: count(::Epic),
epic_issues: count(::EpicIssue),
geo_nodes: count(::GeoNode),
......
# frozen_string_literal: true
module Gitlab
module UsageCounters
class DependencyList < Common
def self.base_key
'DEPENDENCY_LIST_USAGE_COUNTER'
end
end
end
end
......@@ -43,16 +43,6 @@ RSpec.describe Projects::DependenciesController do
end
end
context 'when usage ping is collected' do
let(:user) { developer }
it 'counts usage of the feature' do
expect(::Gitlab::UsageCounters::DependencyList).to receive(:increment).with(project.id)
get :index, params: params, format: :json
end
end
context 'with existing report' do
let_it_be(:pipeline) { create(:ee_ci_pipeline, :with_dependency_list_report, project: project) }
......
......@@ -93,7 +93,6 @@ RSpec.describe Gitlab::UsageData do
container_scanning_jobs
coverage_fuzzing_jobs
dast_jobs
dependency_list_usages_total
dependency_scanning_jobs
epics
epics_deepest_relationship_level
......
# frozen_string_literal: true
require 'spec_helper'
RSpec.describe Gitlab::UsageCounters::DependencyList, :clean_gitlab_redis_shared_state do
it_behaves_like 'a usage counter'
end
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