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

feat: if user_agent set in gapic ClientInfo, populate the user-agent header #750

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

tswast
Copy link
Contributor

@tswast tswast commented Oct 28, 2024

Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:

  • Make sure to open an issue as a bug/issue before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
  • Ensure the tests and linter pass
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary)

Follow-up to internal issues 352042662 and 351894828.
Related to sdk request 344836155.
🦕

@tswast tswast requested review from a team as code owners October 28, 2024 20:52
@product-auto-label product-auto-label bot added the size: s Pull request size is small. label Oct 28, 2024
@product-auto-label product-auto-label bot added size: m Pull request size is medium. and removed size: s Pull request size is small. labels Oct 29, 2024
return (METRICS_METADATA_KEY, self.to_user_agent())

user_agent = self.to_user_agent()
metadata = [
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We need to be careful with this. Per googleapis/gapic-generator-python#911 it looks like some code might rely on to_grpc_metadata returning a Tuple.

Might be best to introduce a new method to return the list of metadata

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size: m Pull request size is medium.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants