Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1325)

Unified Diff: scripts/master/buildbucket/client.py

Issue 2254643002: Instrument HTTP client requests to buildbucket (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/build.git@reland-tsmon-metrics
Patch Set: Rebase Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | scripts/master/deferred_resource.py » ('j') | scripts/master/deferred_resource.py » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: scripts/master/buildbucket/client.py
diff --git a/scripts/master/buildbucket/client.py b/scripts/master/buildbucket/client.py
index 6d476ef722629130ee3570241cf7fd83ac3c1786..cf5e7bab50f47468a48f2d822763dccf7893fe84 100644
--- a/scripts/master/buildbucket/client.py
+++ b/scripts/master/buildbucket/client.py
@@ -13,7 +13,8 @@ from master import auth
from master import deferred_resource
from master.buildbucket import common
import apiclient
-import httplib2
+
+from infra_libs import InstrumentedHttp
BUILDBUCKET_HOSTNAME_PRODUCTION = 'cr-buildbucket.appspot.com'
BUILDBUCKET_HOSTNAME_TESTING = 'cr-buildbucket-test.appspot.com'
@@ -48,7 +49,7 @@ def create_buildbucket_service(master, hostname=None, verbose=None):
# https://chromium.googlesource.com/chromium/tools/build/+/08b404f/third_party/google_api_python_client/googleapiclient/discovery.py#146
# https://chromium.googlesource.com/chromium/tools/build/+/08b404f/third_party/google_api_python_client/googleapiclient/discovery.py#218
resource = apiclient.discovery.Resource(
- http=httplib2.Http(),
+ http=InstrumentedHttp('buildbucket'),
# Note that this does not include _ah/ in URL path, which means
# we bypass Cloud Endpoints proxy server. See also:
# https://bugs.chromium.org/p/chromium/issues/detail?id=626650
« no previous file with comments | « no previous file | scripts/master/deferred_resource.py » ('j') | scripts/master/deferred_resource.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698