Split the Duo seats metric into four by type
requested to merge 477583-instrument-service-ping-metric-for-number-of-duo-seats-assigned-2 into master
What does this MR do and why?
As noted in !166182 (comment 2125243696) we need to split Duo seats metric into four (by add-on type): Pro and Enterprise and then additionally by seats type: purchased and assigned
Since the initial metric was introduced in the current milestone its safe to modify it instead of retiring and creating the new ones (it shipped to SM instances yet).
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
Before | After |
---|---|
How to set up and validate locally
- Make sure you have Team Member License or any other active subscription active.
- Make sure you have active Duo pro add on
GitlabSubscriptions::AddOnPurchase.for_gitlab_duo_pro.active.any?
# Or
GitlabSubscriptions::AddOnPurchase.for_duo_enterprise.active.any?
- Run
rails c
and generate service ping locally
> q = Gitlab::Usage::ServicePingReport.for(output: :all_metrics_values)
> q["duo_seats"]
=> {"enterprise_assigned"=>nil, "enterprise_purchased"=>nil, "pro_assigned"=>10, "pro_purchased"=>10}```
<!--
Example below:
1. In rails console enable the experiment fully
```ruby
Feature.enable(:member_areas_of_focus)
- Visit any group or project member pages such as
http://127.0.0.1:3000/groups/flightjs/-/group_members
- Click the
invite members
button. -->
Related to #477583 (closed)
Edited by Niko Belokolodov