Merge "Add profiling support to Zaqar client"
This commit is contained in:
commit
6b9123ac95
@ -16,10 +16,14 @@
|
||||
from distutils import version
|
||||
import json
|
||||
|
||||
from oslo_utils import importutils
|
||||
|
||||
from zaqarclient.common import http
|
||||
from zaqarclient.transport import base
|
||||
from zaqarclient.transport import response
|
||||
|
||||
osprofiler_web = importutils.try_import("osprofiler.web")
|
||||
|
||||
|
||||
class HttpTransport(base.Transport):
|
||||
|
||||
@ -82,6 +86,9 @@ class HttpTransport(base.Transport):
|
||||
else:
|
||||
headers['content-type'] = 'application/json'
|
||||
|
||||
if osprofiler_web:
|
||||
headers.update(osprofiler_web.get_trace_id_headers())
|
||||
|
||||
resp = self.client.request(method,
|
||||
url=url,
|
||||
params=request.params,
|
||||
|
Loading…
Reference in New Issue
Block a user