Merge "Add profiling support to keystoneclient"

This commit is contained in:
Jenkins
2014-07-04 20:14:38 +00:00
committed by Gerrit Code Review

View File

@@ -20,9 +20,11 @@ import six
from six.moves import urllib from six.moves import urllib
from keystoneclient import exceptions from keystoneclient import exceptions
from keystoneclient.openstack.common import importutils
from keystoneclient.openstack.common import jsonutils from keystoneclient.openstack.common import jsonutils
from keystoneclient import utils from keystoneclient import utils
osprofiler_web = importutils.try_import("osprofiler.web")
USER_AGENT = 'python-keystoneclient' USER_AGENT = 'python-keystoneclient'
@@ -206,6 +208,9 @@ class Session(object):
headers['X-Auth-Token'] = token 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 # 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 # should ignore the filter. This will make it easier for clients who
# want to overrule the default endpoint_filter data added to all client # want to overrule the default endpoint_filter data added to all client