]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/prometheus: don't store exception as e 38333/head
authorKen Dreyer <kdreyer@redhat.com>
Thu, 3 Dec 2020 17:48:06 +0000 (10:48 -0700)
committerBoris Ranto <branto@redhat.com>
Thu, 28 Jan 2021 14:54:24 +0000 (15:54 +0100)
Python's logging module's exception() method will log the full exception
and stack trace for us, so we do not need to store the exception in the
"e" variable here.

Signed-off-by: Ken Dreyer <kdreyer@redhat.com>
(cherry picked from commit a17c603effd3367dc64c87a1d6c53d6d3d794fc7)

src/pybind/mgr/prometheus/module.py

index f5684f257ef54caac7dcb2323fb8d1445759abd7..f3068250fd9fd023e33fdb2b214feff98817d916 100644 (file)
@@ -201,7 +201,7 @@ class MetricCollectionThread(threading.Thread):
 
                 try:
                     data = self.mod.collect()
-                except Exception as e:
+                except:
                     # Log any issues encountered during the data collection and continue
                     self.mod.log.exception("failed to collect metrics:")
                     self.event.wait(self.mod.scrape_interval)