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: allow extra_api_info to be passed to api request #183

Merged
merged 4 commits into from
Apr 1, 2022
Merged

feat: allow extra_api_info to be passed to api request #183

merged 4 commits into from
Apr 1, 2022

Conversation

unforced
Copy link
Contributor

In order to track retry metrics, we need to add extra information to the X-Goog-API-Client header.

https://docs.google.com/document/d/1xo1OlU2ESmVYUgpfn5FjCpRoH-f6JXxlRTQg_2FEdTQ/edit?resourcekey=0-hwjKNEbdT01zQ7QsZG3Srw

This is in line with how it is done in other parts of cloud such as cloud sdk.

This PR adds an extra argument to Connection.api_request and _make_request that allows for this extra_api_info to be passed in.

@unforced unforced requested a review from a team as a code owner March 31, 2022 20:21
@busunkim96 busunkim96 requested a review from parthea April 1, 2022 17:20
Copy link
Contributor

@busunkim96 busunkim96 left a comment

Choose a reason for hiding this comment

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

LGTM! Please update the docstring before merging.

google/cloud/_http/__init__.py Show resolved Hide resolved
@product-auto-label product-auto-label bot added the size: s Pull request size is small. label Apr 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size: s Pull request size is small.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants