Add compliance control status transition events and metrics
What does this MR do and why?
Adds two internal tracking events/metrics:
- Total count of control status from pass to fail
- Total count of control status from fail to pass
Add compliance control status transition events and metrics
Changelog: other EE: true
References
Please include cross links to any resources that are relevant to this MR. This will give reviewers and future readers helpful context to give an efficient review of the changes introduced.
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.
To setup test data, I would follow this prior MR as it uses the same code: !180107 (merged)
(also _weekly, _monthly)
This will allow you to monitor metrics in real time:
rails runner scripts/internal_events/monitor.rb g_sscs_compliance_control_status_fail_to_pass g_sscs_compliance_control_status_pass_to_fail
Or in console to check the metrics:
require_relative 'spec/support/helpers/service_ping_helpers.rb'
# For pass-to-fail events
puts "Current pass-to-fail count: #{ServicePingHelpers.get_current_usage_metric_value('counts.g_sscs_compliance_control_status_pass_to_fail')}"
# For fail-to-pass events
puts "Current fail-to-pass count: #{ServicePingHelpers.get_current_usage_metric_value('counts.g_sscs_compliance_control_status_fail_to_pass')}"