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