diff --git a/keystoneclient/session.py b/keystoneclient/session.py index 743c22672..ddfe089d1 100644 --- a/keystoneclient/session.py +++ b/keystoneclient/session.py @@ -17,9 +17,11 @@ import six from six.moves import urllib from keystoneclient import exceptions +from keystoneclient.openstack.common import importutils from keystoneclient.openstack.common import jsonutils from keystoneclient import utils +osprofiler_web = importutils.try_import("osprofiler.web") USER_AGENT = 'python-keystoneclient' @@ -189,6 +191,9 @@ class Session(object): headers['X-Auth-Token'] = token + if osprofiler_web: + headers.update(osprofiler_web.get_trace_id_headers()) + # if we are passed a fully qualified URL and an endpoint_filter we # should ignore the filter. This will make it easier for clients who # want to overrule the default endpoint_filter data added to all client