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
This commit is contained in:
parent
ac672387ab
commit
f8e8eaf586
@ -17,6 +17,8 @@ import sys
|
|||||||
|
|
||||||
from oslo_config import cfg
|
from oslo_config import cfg
|
||||||
from oslo_log import log
|
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
|
from oslo_service import wsgi
|
||||||
|
|
||||||
# Need to register global_opts
|
# Need to register global_opts
|
||||||
@ -30,9 +32,12 @@ CONF = cfg.CONF
|
|||||||
|
|
||||||
def initialize_application():
|
def initialize_application():
|
||||||
log.register_options(CONF)
|
log.register_options(CONF)
|
||||||
|
gmr_opts.set_defaults(CONF)
|
||||||
CONF(sys.argv[1:], project="manila", version=version.version_string())
|
CONF(sys.argv[1:], project="manila", version=version.version_string())
|
||||||
config.verify_share_protocols()
|
config.verify_share_protocols()
|
||||||
log.setup(CONF, "manila")
|
log.setup(CONF, "manila")
|
||||||
|
|
||||||
|
gmr.TextGuruMeditation.setup_autorun(version, conf=CONF)
|
||||||
rpc.init(CONF)
|
rpc.init(CONF)
|
||||||
service.setup_profiler("manila-api", CONF.host)
|
service.setup_profiler("manila-api", CONF.host)
|
||||||
return wsgi.Loader(CONF).load_app(name='osapi_share')
|
return wsgi.Loader(CONF).load_app(name='osapi_share')
|
||||||
|
Loading…
Reference in New Issue
Block a user