Commit 4cc9082e authored by Bob Van Landuyt's avatar Bob Van Landuyt

Merge branch '340847-remove-deprecated-metric-status-7' into 'master'

Remove `deprecated` i_package_composer_deploy_token_weekly metric

See merge request gitlab-org/gitlab!76904
parents 84a0d1e8 1863a25c
......@@ -8,7 +8,7 @@ product_stage: package
product_group: group::package
product_category: package registry
value_type: number
status: deprecated
status: removed
time_frame: 7d
data_source: redis_hll
instrumentation_class: RedisHLLMetric
......
......@@ -104,7 +104,7 @@ module Gitlab
events_names = events_for_category(category)
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]))
end
......
......@@ -1289,6 +1289,8 @@ RSpec.describe Gitlab::UsageData, :aggregate_failures do
let(:categories) { ::Gitlab::UsageDataCounters::HLLRedisCounter.categories }
let(:ignored_metrics) { ["i_package_composer_deploy_token_weekly"] }
it 'has all known_events' do
expect(subject).to have_key(:redis_hll_counters)
......@@ -1298,6 +1300,7 @@ RSpec.describe Gitlab::UsageData, :aggregate_failures do
keys = ::Gitlab::UsageDataCounters::HLLRedisCounter.events_for_category(category)
metrics = keys.map { |key| "#{key}_weekly" } + keys.map { |key| "#{key}_monthly" }
metrics -= ignored_metrics
if ::Gitlab::UsageDataCounters::HLLRedisCounter::CATEGORIES_FOR_TOTALS.include?(category)
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