Add panels for MTTP and adjusted MTTP over selected time range
This MR adds
- A panel to display the MTTP over the selected time range
- A panel to display the adjusted MTTP over the selected time range (using the new metric added in gitlab-org/release-tools!2514 (merged))
- A row to display adjusted MR lead time for the selected deploy version (also using the new metric).
This is the query I used for the "Average MTTP over time range" panel, along with the reasoning behind each part.
avg(
// We need to use last_over_time to convert the range result into an instant result. The value of each time series remains the same over time.
last_over_time(delivery_deployment_merge_request_lead_time_seconds{target_env="gprd", target_stage="main"}[24h])
// `A unless B` removes any time series from A if it is present in B. This effectively allows us to choose time
// series that appeared only in the selected time range, and exclude all other time series.
unless
(
// `offset` gives us the value of the metric 24 hours in the past.
// Read the docs for offset here: https://prometheus.io/docs/prometheus/latest/querying/basics/#offset-modifier
// For the time range, I chose 12 hours just to collect metrics over a large enough time range. This does not need
// to be the same as $__range.
last_over_time(
delivery_deployment_merge_request_lead_time_seconds{target_env="gprd", target_stage="main"}[12h] offset 24h
)
)
)
Snapshot: https://dashboards.gitlab.net/dashboard/snapshot/yTGSRr7Evxrg83DdcDbHwP3NMvPsuNN2
Edited by Reuben Pereira