crimson/admin: correct metrics dumping methods

First level object has no key, so we have to inclose metric objects with
an outer one

Signed-off-by: Xuehan Xu <xxhdx1985126@gmail.com>
This commit is contained in:
Xuehan Xu 2023-01-10 06:55:57 +00:00
parent 6243f33d0b
commit 702fe1ccc3

View File

@ -240,7 +240,9 @@ public:
}
for (const auto& [labels, metric] : metric_family) {
if (metric && metric->is_enabled()) {
f->open_object_section(""); // enclosed by array
DumpMetricsHook::dump_metric_value(f, full_name, *metric, labels);
f->close_section();
}
}
}