Skip to content

monitoring: gitserver - use backticks to prevent prometheus from breaking "shard" template var

Administrator requested to merge fix-gitserver-shard-metrics into main

Created by: ggilmore

Fixes https://github.com/sourcegraph/sourcegraph/issues/29217

See the above issue for more details, but essentially when the "shard" value contains special regex characters (such as the . in host.docker.internal:6068 when working on local dev), both Grafana and Prometheus end up trying to escape the value which ends up breaking the dashboard.

Using backticks instead of doublequotes tells Prometheus to not escape any contents inside them (which allows the dashboards to render correctly).

Merge request reports

Loading