Add instrumentation classes for settings metrics
What does this MR do and why?
Related to #409630 (closed).
This MR:
- Moves some of the settings Service Ping metrics to instrumentation classes.
- Adds PrometheusMetric to handle metrics querying Prometheus (being
wrapped by the
#with_prometheus
call) without resorting to evaluate the metric value block in another context withinstance_eval
. - Fixes some specs that were broken by migrating the metrics to the instrumentation class framework.
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
Before | After |
---|---|
How to set up and validate locally
This is covered by RSpec tests, but can be validated manually by building the payload with ServicePing::BuildPayload.new.execute
and checking if the metrics are present.
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.
Edited by Piotr Skorupa