fix: unified registry for service dashboard
fix: unified registry for service dashboard
When changing gitlab-metrics-config to use unified-registry, dashboard generations would error out.
The error is due to aggregationLabels
here is passed as a string
RUNTIME ERROR: Unexpected type string, expected array
<std>:1459:14-33 thunk from <function <anonymous>>
<std>:1456:18-21 thunk from <function <anonymous>>
<std>:1456:5-26 function <anonymous>
<std>:1459:5-40 function <anonymous>
../libsonnet/servicemetrics/recording-rule-registry/unified-registry.libsonnet:79:43-101 thunk <requiredLabelsWithIgnoredLabels> from <function <resolveRecordingRuleFor>>
../libsonnet/servicemetrics/recording-rule-registry/unified-registry.libsonnet:80:38-69 thunk from <thunk <requiredLabels> from <function <resolveRecordingRuleFor>>>
<std>:1509:9-10 thunk from <function <anonymous>>
<std>:1509:5-24 function <anonymous>
../libsonnet/servicemetrics/recording-rule-registry/unified-registry.libsonnet:80:26-85 thunk <requiredLabels> from <function <resolveRecordingRuleFor>>
../libsonnet/servicemetrics/recording-rule-registry/unified-registry.libsonnet:82:37-51 thunk from <thunk <missingLabels> from <function <resolveRecordingRuleFor>>>
...
../libsonnet/grafana/basic.libsonnet:48:13-24 function <panelsForPanel>
../libsonnet/grafana/basic.libsonnet:57:24-69 thunk <directPanels> from <function <validateUniqueIdsForDashboard>>
../libsonnet/grafana/basic.libsonnet:58:33-45 thunk <allPanels> from <function <validateUniqueIdsForDashboard>>
../libsonnet/grafana/basic.libsonnet:76:5-14 thunk from <thunk <uniquePanelIds> from <function <validateUniqueIdsForDashboard>>>
../libsonnet/grafana/basic.libsonnet:(59:26)-(78:4) thunk <uniquePanelIds> from <function <validateUniqueIdsForDashboard>>
../libsonnet/grafana/basic.libsonnet:81:6-20 function <validateUniqueIdsForDashboard>
../libsonnet/grafana/basic.libsonnet:255:9-69 function <anonymous>
../libsonnet/gitlab-dashboards/service_dashboard.libsonnet:(170:7)-(176:17) function <anonymous>
api/main.dashboard.jsonnet:(7:1)-(28:19) $
During evaluation
The fixes here matches what the current selective-registry is doing.
This needs to be merged before we remove the selective recording rule registry in gitlab-com/gl-infra/scalability#2583 and change the default registry to unified-registry https://gitlab.com/gitlab-com/runbooks/-/blob/853616606bbbc5b64772b65164c27b5e410513ca/metrics-catalog/gitlab-metrics-config.libsonnet#L124
Edited by Gregorius Marco