Skip to content

Migrate EE aggregated metrics to new syntax

What does this MR do and why?

In order to support cross system compatibility migrate aggregated metrics to new syntax. Metrics were migrated according to https://docs.gitlab.com/ee/development/service_ping/metrics_instrumentation.html#aggregated-metrics

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('g_compliance_dashboard', values: 1, time: 6.days.ago)
Gitlab::UsageDataCounters::HLLRedisCounter.track_event('i_compliance_audit_events', values: 2, time: 6.days.ago)
  1. Get service ping payload
payload = ServicePing::BuildPayload.new.execute
  1. Get metric data
payload.dig(*"counts_weekly.aggregated_metrics.compliance_features_track_unique_visits_union".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.

Merge request reports