diff --git a/glanceclient/common/http.py b/glanceclient/common/http.py index 7146ace..52cc409 100644 --- a/glanceclient/common/http.py +++ b/glanceclient/common/http.py @@ -20,6 +20,7 @@ import posixpath import socket import StringIO import struct +import tomograph import urlparse try: @@ -154,6 +155,9 @@ class HTTPClient(object): if self.auth_token: kwargs['headers'].setdefault('X-Auth-Token', self.auth_token) + tomograph.start('glanceclient', 'http', socket.gethostname(), 0) + tomograph.add_trace_info_header(kwargs['headers']) + self.log_curl_request(method, url, kwargs) conn = self.get_connection() @@ -201,6 +205,7 @@ class HTTPClient(object): else: self.log_http_response(resp) + tomograph.stop('http') if 400 <= resp.status < 600: LOG.error("Request returned failure status.") raise exc.from_response(resp, body_str)