Add count of created_service_accounts,28d
Related to #517373 (closed)
What does this MR do and why?
- Adds a metric for count.created_service_accounts per 28 days
- Adds a metric for count.active_service_accounts per 28 days
Metric | Action | GitLab.com | Self-Managed | Dedicated |
---|---|---|---|---|
count.created_service_accounts | POST | ![]() |
![]() |
![]() |
count.active_service_accounts | POST & state: 'active' | ![]() |
![]() |
![]() |
Queries
- count.created_service_accounts
Warm Cache = 8 ms
SELECT COUNT(DISTINCT users.id)
FROM users
WHERE users.user_type = 13
AND users.created_at BETWEEN (NOW() - INTERVAL '28 days') AND NOW()
- count.active_service_accounts
Warm Cache = 7.6 ms
SELECT COUNT(DISTINCT users.id)
FROM users
WHERE users.user_type = 13
AND users.state = 'active'
AND users.updated_at BETWEEN (NOW() - INTERVAL '28 days') AND NOW()
How to set up and validate locally
- Change the SQL queries in the .rb files & run the rspecs
- Confirm they fail correctly
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.
Edited by Hakeem Abdul-Razak
Merge request reports
Activity
Please register or sign in to reply