fix(dashboard): stat panels not loading
Stat panels that show whether apdex/error ratios are healthy in the service dashboards are erroring due to not having datasource variable passed, so it defaults to using the Mimir - Gitlab - All Environments
. Then, since the SLO rules exist in both gprd and gstg tenants, the group_left
operation couldn't match them.
The solution is to match by __tenant_id__
in the join statement, eg: (gitlab_service_apdex:ratio_5m{env="gprd",environment="gprd",monitor="global",stage="main",type="api"} < on(tier, type, __tenant_id__) group_left() (1 - (14.4 * (1 - slo:min:events:gitlab_service_apdex:ratio{component="",monitor="global",type="api"}))))
❯ ./test-dashboard.sh api/main.dashboard.jsonnet
Installed https://dashboards.gitlab.net/dashboard/snapshot/BLH9HCID4JHJ9bFHoRFTrNvLSTYmuJqk - api: Overview
❯ ./test-dashboard.sh ai-gateway/main.dashboard.jsonnet
Installed https://dashboards.gitlab.net/dashboard/snapshot/sQ8u1lj8pSQnvqoiKpXrgde5okIT0lVl - ai-gateway: Overview