Skip to content

Migrate expiration policy metrics

What does this MR do and why?

This MR migrate counts.projects_with_expiration_policy_enabled(__with_keep_n_set*) metrics family to instrumentation class.

It resolves part of the metrics included in #339315 (closed)

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

In rails console

payload = ServicePing::BuildPayload.new.execute                                                                        
puts "enabled: #{payload["counts"]["projects_with_expiration_policy_enabled"]}"                                        
puts "enabled with n_keep_100: #{payload["counts"]["projects_with_expiration_policy_enabled_with_keep_n_set_to_100"]}" 
puts "enabled with n_keep_1: #{payload["counts"]["projects_with_expiration_policy_enabled_with_keep_n_set_to_1"]}"     
puts "enabled with n_keep_10: #{payload["counts"]["projects_with_expiration_policy_enabled_with_keep_n_set_to_10"]}"   
puts "enabled with n_keep_5: #{payload["counts"]["projects_with_expiration_policy_enabled_with_keep_n_set_to_5"]}"     
puts "enabled with n_keep_unset: #{payload["counts"]["projects_with_expiration_policy_enabled_with_keep_n_unset"]}"    

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Mikołaj Wawrzyniak

Merge request reports