Set gRPC user-agent when calling google APIs#216
Merged
aabmass merged 2 commits intoGoogleCloudPlatform:mainfrom Dec 5, 2022
Merged
Set gRPC user-agent when calling google APIs#216aabmass merged 2 commits intoGoogleCloudPlatform:mainfrom
aabmass merged 2 commits intoGoogleCloudPlatform:mainfrom
Conversation
aabmass
commented
Nov 16, 2022
punya
reviewed
Nov 17, 2022
Contributor
punya
left a comment
There was a problem hiding this comment.
Should we try to simplify this change by proposing changes to make gax and/or python-monitoring more configurable? Overriding user-agent seems like a common enough use case that they shouldn't make it this hard.
Collaborator
Author
|
I dropped a comment here googleapis/google-cloud-python#15081 (comment). What are your thoughts here in terms of submitting this vs pushing on upstream libraries @punya? |
Contributor
Contributor
|
I'd prefer the reverse. Make it work here, and open issues (here and upstream, if one doesn't already exist) to track making it cleaner/easier upstream. |
Collaborator
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes googleapis/python-api-core#63
Adds user-agent to gRPC calls. Note this will not work if the user overrides the client on their own.
Added an integration test which checks the actual
user-agentmetadata sent in gRPC requests