Commit 1863a25c authored by Niko Belokolodov's avatar Niko Belokolodov Committed by Nikolay Belokolodov

Remove obsolete i_package_composer_deploy_token metric

parent 4efee5d5
...@@ -8,7 +8,7 @@ product_stage: package ...@@ -8,7 +8,7 @@ product_stage: package
product_group: group::package product_group: group::package
product_category: package registry product_category: package registry
value_type: number value_type: number
status: deprecated status: removed
time_frame: 7d time_frame: 7d
data_source: redis_hll data_source: redis_hll
instrumentation_class: RedisHLLMetric instrumentation_class: RedisHLLMetric
......
...@@ -104,7 +104,7 @@ module Gitlab ...@@ -104,7 +104,7 @@ module Gitlab
events_names = events_for_category(category) events_names = events_for_category(category)
event_results = events_names.each_with_object({}) do |event, hash| event_results = events_names.each_with_object({}) do |event, hash|
hash["#{event}_weekly"] = unique_events(**weekly_time_range.merge(event_names: [event])) hash["#{event}_weekly"] = unique_events(**weekly_time_range.merge(event_names: [event])) unless event == "i_package_composer_deploy_token"
hash["#{event}_monthly"] = unique_events(**monthly_time_range.merge(event_names: [event])) hash["#{event}_monthly"] = unique_events(**monthly_time_range.merge(event_names: [event]))
end end
......
...@@ -1292,6 +1292,8 @@ RSpec.describe Gitlab::UsageData, :aggregate_failures do ...@@ -1292,6 +1292,8 @@ RSpec.describe Gitlab::UsageData, :aggregate_failures do
let(:categories) { ::Gitlab::UsageDataCounters::HLLRedisCounter.categories } let(:categories) { ::Gitlab::UsageDataCounters::HLLRedisCounter.categories }
let(:ignored_metrics) { ["i_package_composer_deploy_token_weekly"] }
it 'has all known_events' do it 'has all known_events' do
expect(subject).to have_key(:redis_hll_counters) expect(subject).to have_key(:redis_hll_counters)
...@@ -1301,6 +1303,7 @@ RSpec.describe Gitlab::UsageData, :aggregate_failures do ...@@ -1301,6 +1303,7 @@ RSpec.describe Gitlab::UsageData, :aggregate_failures do
keys = ::Gitlab::UsageDataCounters::HLLRedisCounter.events_for_category(category) keys = ::Gitlab::UsageDataCounters::HLLRedisCounter.events_for_category(category)
metrics = keys.map { |key| "#{key}_weekly" } + keys.map { |key| "#{key}_monthly" } metrics = keys.map { |key| "#{key}_weekly" } + keys.map { |key| "#{key}_monthly" }
metrics -= ignored_metrics
if ::Gitlab::UsageDataCounters::HLLRedisCounter::CATEGORIES_FOR_TOTALS.include?(category) if ::Gitlab::UsageDataCounters::HLLRedisCounter::CATEGORIES_FOR_TOTALS.include?(category)
metrics.append("#{category}_total_unique_counts_weekly", "#{category}_total_unique_counts_monthly") metrics.append("#{category}_total_unique_counts_weekly", "#{category}_total_unique_counts_monthly")
......
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