Instrument Service Ping metric for number of Duo seats assigned
requested to merge 477583-instrument-service-ping-metric-for-number-of-duo-seats-assigned-2 into master
What does this MR do and why?
The code changes introduce a new metric to track the number of Duo seats purchased and assigned to users.
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"]
=> {"pro"=>{"seats"=>10, "assigned"=>0}, "enterprise"=>{"seats"=>nil, "assigned"=>nil}}
Related to #477583 (closed)
Edited by Niko Belokolodov