diff --git a/storage/google/cloud/storage/_http.py b/storage/google/cloud/storage/_http.py index 7bd5d7673a26..032f70e02185 100644 --- a/storage/google/cloud/storage/_http.py +++ b/storage/google/cloud/storage/_http.py @@ -36,6 +36,11 @@ def __init__(self, client, client_info=None, api_endpoint=DEFAULT_API_ENDPOINT): self.API_BASE_URL = api_endpoint self._client_info.client_library_version = __version__ + # TODO: When metrics all use gccl, this should be removed #9552 + if self._client_info.user_agent is None: # pragma: no branch + self._client_info.user_agent = "" + self._client_info.user_agent += " gcloud-python/{} ".format(__version__) + API_VERSION = "v1" """The version of the API, used in building the API call's URL."""