Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: drop gcloud-python header from user agent #449

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 0 additions & 5 deletions google/cloud/storage/_http.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,6 @@ def __init__(self, client, client_info=None, api_endpoint=None):
self.ALLOW_AUTO_SWITCH_TO_MTLS_URL = api_endpoint is None
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__)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When this code is removed, will the user-agent header be blank?

Copy link
Member

@frankyn frankyn May 26, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @parthea, this change was made because tracking does not support x-goog-api-client header yet. If we were to remove this now, we would now see version numbers internally. It should still have a value from python core package for UserAgent. We are appending gcloud-python/{} which is supported right now.


API_VERSION = "v1"
"""The version of the API, used in building the API call's URL."""

Expand Down