Skip to content

Migrate deploy_token_packages metrics

What does this MR do and why?

Use new recommended aggregated metric syntax for ide_edit_total_unique_counts_weekly total metric

Resolves subtask from #373830 (comment 1126596388)

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

How to set up and validate locally

In rails console

  1. Seed data
Gitlab::UsageDataCounters::HLLRedisCounter.track_event('i_package_maven_deploy_token', values: 1, time: 3.days.ago)
Gitlab::UsageDataCounters::HLLRedisCounter.track_event('i_package_npm_deploy_token', values: 2, time: 3.days.ago)
  1. Get service ping payload
payload = ServicePing::BuildPayload.new.execute
  1. Get metric data
payload.dig(*"redis_hll_counters.deploy_token_packages.deploy_token_packages_total_unique_counts_monthly".split('.'))

You can repeat step 2 and 3 on both master and feature branch to compare that there are no changes to returned data

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Mikołaj Wawrzyniak

Merge request reports