Add ability to use options to parametrize relation definition in instrumentation classes
requested to merge mwaw/migrate_projects_with_expiration_policy_enabled_to_instrumentation_class into master
What does this MR do and why?
Prior to this MR, DatabaseMetric
instrumentation classes relations could only be parametrized by overwriting internal base methods. This approach was complex, confusing and error prone, as it relied on internal API of instrumentation classes framework. This MR enhance instrumentation classes framework DSL to enable developers
to parametrize relation defined for database metrics via lambda
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
In rails console
[1] pry(main)> payload = ServicePing::BuildPayload.new.execute
[2] pry(main)> payload["counts"]["projects_with_expiration_policy_disabled"]
=> 19
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.