]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/admin: correct metrics dumping methods 49686/head
authorXuehan Xu <xxhdx1985126@gmail.com>
Tue, 10 Jan 2023 06:55:57 +0000 (06:55 +0000)
committerXuehan Xu <xxhdx1985126@gmail.com>
Wed, 11 Jan 2023 02:30:06 +0000 (02:30 +0000)
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>
src/crimson/admin/osd_admin.cc

index 4f7e149ea0f6680fc379a4ad3adcbbfaf21e8a81..2bcfb39922f8e70f1b8135e25ec142798b07705c 100644 (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();
             }
           }
         }