Add enforcement_type label to MR approval policy metrics
What does this MR do and why?
This MR extends the MR approval policy metrics to track the enforcement type (enforce or warn mode) of policies. This enables us to measure adoption of warn mode and track progress toward the 30% increase target for MR approval policies created within 3 months.
References
Verification steps
- Run
bundle exec rails runner scripts/internal_events/monitor.rb create_approval_rule_from_merge_request_approval_policyscript - Create new project (ensure you have Ultimate license)
- Create new Merge Request Approval Policy with enforce mode, then create new MR and merge it
- Verify that the metrics are incremented for the enforce enforcement_type
- Repeat steps 3-4 with a policy in warn mode and verify metrics are incremented for the warn enforcement_type
Related to #582870
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Related to #582870