Skip to content

Migrate compliance_total metrics to new aggregated metric syntax and marks them as broken

What does this MR do and why?

  1. Use new recommended aggregated metric syntax for first batch of total metrics
  2. Mark compliance_total as broken due to discovered bug #378091
  3. Adds broken as available status in metric definition to preserve consistent behavior of broken metrics between usage_data.rb and instrumentation classes implementations. Prior to that change, broken metrics from usage_data.rb were present in payload, while those from instrumentation classes were removed, after the change metrics will not be removed from payload when marked as broken

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_search_total', values: 1, time: 3.days.ago)
Gitlab::UsageDataCounters::HLLRedisCounter.track_event('i_search_advanced', values: 2, time: 3.days.ago)

Get service ping payload

payload = ServicePing::BuildPayload.new.execute

Get metric data

payload.dig(*"search_unique_visits.search_unique_visits_for_any_target_monthly".split('.'))

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