Skip to content

Commit

Permalink
fix: add gcloud-python header to user agent (#9551)
Browse files Browse the repository at this point in the history
* fix: add gcloud-python header to user agent
  • Loading branch information
crwilcox committed Oct 29, 2019
1 parent de3abdf commit 025867a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions storage/google/cloud/storage/_http.py
Original file line number Diff line number Diff line change
Expand Up @@ -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."""

Expand Down

0 comments on commit 025867a

Please sign in to comment.