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)
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)