feat: add tier variable to DORA dashboard #432
No reviewers
Labels
No labels
domain:backend
domain:devops
domain:frontend
status:approved
status:in-progress
status:needs-fix
status:qa
type:bug
type:devops
type:feature
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
ldraney/pal-e-platform!432
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "427-grafana-tier-variable"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Add a tier dropdown variable to the DORA Grafana dashboard so overview panels aggregate only production repos by default. Supports three selections: Tier 1 (Production), Tier 1+2 (All Tracked), and All.
Closes #427
Changes
terraform/dashboards/dora-dashboard.json-- addedtiercustom variable with value:label pairs (tier-1, tier-[12], .*)tier=~"$tier"filterrepovariable query to filter bytier=~"$tier"so the repo dropdown only shows repos matching the selected tierTest Plan
tofu apply$repovariable still works independentlyRelated
PR #432 Review
DOMAIN REVIEW
Tech stack: Grafana dashboard JSON provisioned via Terraform. Domain checklist: Terraform/Grafana infrastructure.
Tier variable definition -- Correctly implemented as a
customtype variable with three options:tier-1: Tier 1 (Production) -- default, selected:truetier-[12]: Tier 1+2 (All Tracked).*: AllThe regex values are well-chosen:
tier-1is an exact match for production,tier-[12]is a character class matching tier-1 and tier-2, and.*matches everything including repos without a tier label (correct "All" behavior).Metric expression coverage -- All 15 metric selector modifications verified across 13 target entries (some expressions contain multiple selectors, e.g., CFR panels):
No metric expressions are missing the
tier=~"$tier"filter. Zero omissions.Repo variable scoping -- The
repovariable definition correctly updated from:to:
This creates proper cascading behavior: changing the tier dropdown filters the repo dropdown to show only repos in that tier.
Panel ID collisions -- All 18 panel IDs verified unique and sequential (1-18). No collisions.
PR #396 compatibility -- Color thresholds (stepped mode on stat panels, threshold-based coloring on gauge) and trend panels (timeseries with classic palette) are fully preserved. The tier filter is additive to the metric selectors and does not modify any fieldConfig, thresholds, or visualization settings.
BLOCKERS
None.
NITS
The
repovariablerefreshis set to2(on time range change). Consider whether1(on dashboard load) would be more appropriate, since tier selection is independent of time range. However,2is actually fine here because it ensures the repo list stays fresh -- not a change request, just a note.PR body says "15 metric expressions" which is accurate for individual selector modifications, but could be clearer that this spans 13 target entries (some expressions have multiple selectors). Minor documentation precision point.
SOP COMPLIANCE
PROCESS OBSERVATIONS
.*fallback for "All" ensures backward compatibility -- existing dashboard links without a tier parameter will show all data.VERDICT: APPROVED
PR #432 Review (Post-Merge)
DOMAIN REVIEW
Tech stack: Grafana dashboard JSON managed via Terraform. Domain checks: Grafana JSON structure, Prometheus query correctness, Terraform state safety.
Tier variable definition -- Correctly defined as
type: "custom"with three options:tier-1(Tier 1 Production) -- default,selected: truetier-[12](Tier 1+2 All Tracked).*(All)All three regex patterns are valid for Prometheus
=~matching. Default is Tier 1 as intended.Variable ordering -- The
tiervariable is inserted before therepovariable intemplating.list. This is correct becausereponow depends on$tiervialabel_values(dora_pr_merges_total{tier=~"$tier"}, repo). Grafana evaluates variables in list order, so this dependency is properly satisfied.Metric query coverage -- All 15 target expressions across 4 categories are updated with
tier=~"$tier":Repo variable scoped to tier -- Both the
definitionfield and thequery.queryfield are updated tolabel_values(dora_pr_merges_total{tier=~"$tier"}, repo). Therefresh: 2setting (on dashboard load) ensures the repo dropdown re-evaluates when tier changes.Panel ID collisions -- No panel IDs are added or modified in this diff. Only
exprfields and thetemplating.listarray are touched. No collision risk.Grafana JSON validity -- The tier variable object includes all required fields (
current,hide,includeAll,label,multi,name,options,query,queryValue,refresh,skipUrlSync,type). Structure is consistent with the existing datasource and repo variable definitions.Terraform state safety -- This modifies a dashboard JSON file, not Terraform state resources. The dashboard will be re-provisioned on next
tofu apply. No state-breaking changes.BLOCKERS
None.
NITS
Repo variable refresh timing --
refresh: 2(on dashboard load) means the repo dropdown will not dynamically update when the tier dropdown is changed mid-session. Grafana supportsrefresh: 1(on time range change) but not "on variable change" natively. Users will need to reload the dashboard after changing the tier to see the repo list update. This is a Grafana limitation, not a code bug, but worth noting for user documentation.PR body claims 15 expressions but counts overlap -- The body says "4 overview stats, 5 per-repo detail panels, 4 trend panels, 2 lead time quantiles" which sums to 15, but the 2 lead time quantiles are part of the 4 overview stats. The actual count is 13 distinct target objects modified across the diff (with the per-repo CFR having 3 filter insertions in 1 expression). Minor documentation imprecision.
SOP COMPLIANCE
Closes #427presentfeat: add tier variable to DORA dashboard)PROCESS OBSERVATIONS
dora-metrics-exporter PR #3(merged) is correctly documented.VERDICT: APPROVED