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.
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(gax): append cred-type header for auth metrics #3186
feat(gax): append cred-type header for auth metrics #3186
Changes from 10 commits
2dbd2d8
ee2624c
fe3ed54
0cd0ad8
b1dd5b0
781f161
01adbde
32f8934
51bed23
0424fd2
0e69f72
b50896a
6e60633
33e24d9
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it decided to append
cred-type/
tox-goog-api-client
header? It seems all other header tokens inx-goog-api-client
are static values from the client, not from user input. I wonder why we didn't choose to use a separate header key for this purpose?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, this design is already implemented for other some languages. See details in design go/googleapis-auth-metric-design section 2.3.2. I don't think I saw discussion on using a different header specifically though.
IIUC, this header is eventually sent per request, at that time, I don't see credentials type much different than other client lib info? Do you have specific concerns about this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The concern is that
x-goog-api-client
was constructed in the generated layer only with static values, the name of the headerapi-client
also seems to indicate that the header is supposed to contain only info for the client, not for requests.In terms of the Java implementations, we now also have multiple places modifying the
x-goog-api-client
value, in bothClientContext
andApiClientHeaderProvider
, which make this header harder to maintain in the future and also more error prone.That being said, it is probably too late to change the overall design. We just need to be ware of the consequences and add more docs if possible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see your point.
Let me know if you see better suited places for additional docs.