Add total count of compliance frameworks to usage ping
What does this MR do?
- Adds a new
custom_compliance_frameworks
key to the usage ping that counts the number of compliance frameworks created by a GitLab instance. - This is to allow groupcompliance the ability to measure the usage of this feature.
Product intelligence review
Generated queries
pry(main)> Gitlab::UsageData.count(::ComplianceManagement::Framework)
CACHE (0.1ms) SELECT MIN("compliance_management_frameworks"."id") FROM "compliance_management_frameworks"
CACHE (0.0ms) SELECT MAX("compliance_management_frameworks"."id") FROM "compliance_management_frameworks"
(0.5ms) SELECT COUNT("compliance_management_frameworks"."id") FROM "compliance_management_frameworks" WHERE "compliance_management_frameworks"."id" >= 0 AND "compliance_management_frameworks"."id" < 1 /*application:console,line:/ee/lib/gitlab/database/load_balancing/connection_proxy.rb:94:in `block in read_using_load_balancer'*/
- MIN and MAX queries did not exceed 4ms execution time.
- COUNT query took 6ms.
Time: 6.424 ms
- planning: 0.311 ms
- execution: 6.113 ms
- I/O read: 5.307 ms
- I/O write: N/A
Shared buffers:
- hits: 12 (~96.00 KiB) from the buffer pool
- reads: 4 (~32.00 KiB) from the OS file cache, including disk I/O
- dirtied: 1 (~8.00 KiB)
- writes: 0
Does this MR meet the acceptance criteria?
Conformity
-
📋 Does this MR need a changelog?-
I have included a changelog entry. -
I have not included a changelog entry because _____.
-
-
Documentation (if required) -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers -
Informed Infrastructure department of a default or new setting change, if applicable per definition of done
Security
If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:
-
Label as security and @ mention @gitlab-com/gl-security/appsec
-
The MR includes necessary changes to maintain consistency between UI, API, email, or other methods -
Security reports checked/validated by a reviewer from the AppSec team
Related to #325545 (closed)
Edited by Max Woolf