]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/prometheus: Fix the per method stats exported 44146/head
authorPaul Cuzner <pcuzner@redhat.com>
Wed, 24 Nov 2021 01:28:01 +0000 (14:28 +1300)
committerKonstantin Shalygin <k0ste@k0ste.ru>
Tue, 30 Nov 2021 09:57:15 +0000 (16:57 +0700)
The per method stats were missing due to a typo. This patch
addresses that to ensure that we get the method timings and
count 'counters'

Fixes: https://tracker.ceph.com/issues/53379
Signed-off-by: Paul Cuzner <pcuzner@redhat.com>
(cherry picked from commit 34afdc88fc40effc65f5ae4ccfbad48ef5d26985)

src/pybind/mgr/prometheus/module.py

index 896c0f4e3c5ac21f27854d10ce69c72e94513a40..95d87546e9b42916a6b082d05692b7b1749914a5 100644 (file)
@@ -1179,7 +1179,7 @@ class Module(MgrModule):
                 'prometheus_collect_duration_seconds_count',
                 'The amount of metrics gathered for this exporter',
                 ('method',))
-            self.metrics['prometheus_collect_duration_seconds_sum'] = count_metric
+            self.metrics['prometheus_collect_duration_seconds_count'] = count_metric
 
         # Collect all timing data and make it available as metric, excluding the
         # `collect` method because it has not finished at this point and hence