From f8e8eaf586ef1f59dffbcbc590bf60e3fca21728 Mon Sep 17 00:00:00 2001 From: Maurice Escher Date: Thu, 31 Mar 2022 14:35:26 +0200 Subject: [PATCH] Add Guru Meditation Report to wsgi best use it with the file_event_handler config of oslo_reports since using signal handlers is discouraged on wsgi Closes-Bug: #1967326 Change-Id: I81569723adb5ff33076ec96b9ec3216b177379f3 --- manila/wsgi/wsgi.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/manila/wsgi/wsgi.py b/manila/wsgi/wsgi.py index 131ef0d330..46bf1686ab 100644 --- a/manila/wsgi/wsgi.py +++ b/manila/wsgi/wsgi.py @@ -17,6 +17,8 @@ import sys from oslo_config import cfg from oslo_log import log +from oslo_reports import guru_meditation_report as gmr +from oslo_reports import opts as gmr_opts from oslo_service import wsgi # Need to register global_opts @@ -30,9 +32,12 @@ CONF = cfg.CONF def initialize_application(): log.register_options(CONF) + gmr_opts.set_defaults(CONF) CONF(sys.argv[1:], project="manila", version=version.version_string()) config.verify_share_protocols() log.setup(CONF, "manila") + + gmr.TextGuruMeditation.setup_autorun(version, conf=CONF) rpc.init(CONF) service.setup_profiler("manila-api", CONF.host) return wsgi.Loader(CONF).load_app(name='osapi_share')