feat(dataconnect): add "X-Client-Platform" and "X-Client-Version" headers - #3222
Open
dconeybe wants to merge 2 commits into
Open
feat(dataconnect): add "X-Client-Platform" and "X-Client-Version" headers#3222dconeybe wants to merge 2 commits into
dconeybe wants to merge 2 commits into
Conversation
…lient-Version" headers Googlers see go/dataconnect:sdk:headers for details
Contributor
There was a problem hiding this comment.
Code Review
This pull request adds 'x-client-platform' and 'x-client-version' headers to the Data Connect API client and updates the corresponding unit tests. The reviewer suggested capitalizing these headers to 'X-Client-Platform' and 'X-Client-Version' in both the implementation and test files to maintain consistency with existing headers.
…ther headers The new headers `'x-client-platform'` and `'x-client-version'` are defined in lowercase, which is inconsistent with the Pascal-Kebab-Case used for other headers in this object (e.g., `'X-Firebase-Client'`, `'X-Goog-Api-Client'`) and the PR title (`X-Client-Platform` and `X-Client-Version`). For consistency and to match the PR description, these should be capitalized. See #3222 (comment)
dconeybe
marked this pull request as ready for review
July 28, 2026 19:46
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.
This PR adds
x-client-platformandx-client-versionrequest headers to the Data Connect gRPC connections. These headers supply the client platform (node) and SDK version (utils.getSdkVersion()) to enable metrics collection in Cloud Monitoring.Highlights
x-client-platform(set to"node") andx-client-version(set toutils.getSdkVersion()) request headers togetHeaders()indata-connect-api-client-internal.ts.EXPECTED_HEADERS,EXPECTED_HEADERS_WITH_GEN, andEMULATOR_EXPECTED_HEADERStest fixture objects indata-connect-api-client-internal.spec.tsto assert the presence and values of both headers on outgoing requests.Changelog
x-client-platformandx-client-versionheaders togetHeaders().x-client-platformandx-client-versionheaders.