Move work item weight counters to CE
What does this MR do and why?
Move the event counter users_updating_weight_estimate
, which tracks an EE feature, to the CE section. The counter itself would only increment if used within EE instances and return 0
from CE instances.
Why? We want to be able to aggregate the count into the metrics such as users_work_items
which resides in the CE section rather than creating a separate EE exclusive aggregate metric (e.g., users_work_items_ee
)
How to set up and validate locally
To test the counter's been added to aggregate metrics correctly, follow these steps.
This example considers counts_weekly.aggregated_metrics.users_work_items
, one of the updated aggregated metrics.
- On master branch, execute the following line and note the value.
ServicePing::BuildPayload.new.execute.dig(*"counts_weekly.aggregated_metrics.users_work_items".split('.'))
- In the rails console, increment the counter
users_updating_weight_estimate
.
Since the aggregation happens weekly for the example aggregated metric, time
argument should be set to 1.week.ago
.
The value here is going to be an author id (we will arbitrarily use 999
.)
Gitlab::UsageDataCounters::HLLRedisCounter.track_event(:users_updating_weight_estimate, values: 999, time: 1.week.ago)
- Check out the value of the aggregated metric on
master
and confirm the value didn't change.
ServicePing::BuildPayload.new.execute.dig(*"counts_weekly.aggregated_metrics.users_work_items".split('.'))
- Check out the value of the aggregated metric on this MR's branch and confirm the value's been updated.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.