mirror of
https://github.com/XRPLF/rippled.git
synced 2026-07-11 17:20:18 +00:00
Merge branch 'pratik/otel-phase5-docs-deployment' into pratik/otel-phase6-statsd
Forward-merge the Rule D __name__ builtin fix (and prior naming-check work).
This commit is contained in:
@@ -699,6 +699,7 @@ def run_rule_d_dashboards(root: Path, l1_keys: Set[str], report: Report) -> None
|
||||
report.skip("D", "no L1 key set to validate against")
|
||||
return
|
||||
builtins = {
|
||||
"__name__", # Prometheus reserved label for the metric name itself
|
||||
"le",
|
||||
"exported_instance",
|
||||
"span_name",
|
||||
|
||||
@@ -502,6 +502,14 @@ class RuleDDashboards(unittest.TestCase):
|
||||
[],
|
||||
)
|
||||
|
||||
def test_prometheus_name_label_not_flagged(self):
|
||||
# `__name__` is the Prometheus reserved metric-name label; the renamed
|
||||
# system-*.json dashboards use `sum by (le, __name__)`.
|
||||
self.assertEqual(
|
||||
self._run('"expr": "sum by (le, __name__) (rate(x[5m]))"', set()),
|
||||
[],
|
||||
)
|
||||
|
||||
def test_l1_label_passes(self):
|
||||
self.assertEqual(self._run('"q": "{command=\\"x\\"}"', {"command"}), [])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user