summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--osprofiler/initializer.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/osprofiler/initializer.py b/osprofiler/initializer.py
index 37d70b2..2921f30 100644
--- a/osprofiler/initializer.py
+++ b/osprofiler/initializer.py
@@ -30,14 +30,17 @@ def init_from_conf(conf, context, project, service, host):
running on.
"""
connection_str = conf.profiler.connection_string
+ kwargs = {}
+ if connection_str.startswith("messaging"):
+ kwargs = {"messaging": oslo_messaging,
+ "transport": oslo_messaging.get_transport(conf)}
_notifier = notifier.create(
connection_str,
- messaging=oslo_messaging,
context=context,
- transport=oslo_messaging.get_transport(conf),
project=project,
service=service,
host=host,
- conf=conf)
+ conf=conf,
+ **kwargs)
notifier.set(_notifier)
web.enable(conf.profiler.hmac_keys)