Skip to content

feat(dataconnect): add "X-Client-Version" header for cloud monitoring - #971

Merged
dconeybe merged 2 commits into
winefrom
dconeybe/dataconnect/CloudMonitoringHeaders
Jul 31, 2026
Merged

feat(dataconnect): add "X-Client-Version" header for cloud monitoring#971
dconeybe merged 2 commits into
winefrom
dconeybe/dataconnect/CloudMonitoringHeaders

Conversation

@dconeybe

@dconeybe dconeybe commented Jul 30, 2026

Copy link
Copy Markdown

This PR adds the X-Client-Version request header (formatted as python/<version>) to _DataConnectApiClient to enable metrics collection in Cloud Monitoring.

Highlights

  • Cloud Monitoring Metrics Header: Added the X-Client-Version header (set to python/{firebase_admin.__version__}) to outgoing requests in _DataConnectApiClient to enable Cloud Monitoring telemetry.
  • Test Updates: Updated unit test suites to verify that X-Client-Version is correctly attached to API client requests.
Changelog
  • dataconnect.py
    • Updated _headers to include the X-Client-Version header formatted as python/{firebase_admin.__version__} in default request headers.
  • test_data_connect.py
    • Updated unit test assertions in TestDataConnectApiClientGetHeaders to verify X-Client-Version is included in request headers.

Googlers see go/dataconnect:sdk:headers for details

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request adds the 'X-Client-Version' header to the HTTP headers returned by the Data Connect client in 'firebase_admin/dataconnect.py', and updates the corresponding unit tests in 'tests/test_data_connect.py' to verify its presence and value. There are no review comments, and I have no feedback to provide.

@dconeybe dconeybe changed the title dataconnect.py: add "X-Client-Version" header for cloud monitoring feat(dataconnect): add "X-Client-Version" header for cloud monitoring Jul 30, 2026
@dconeybe
dconeybe marked this pull request as ready for review July 30, 2026 21:41
@dconeybe
dconeybe requested review from mk2023 and stephenarosaj July 30, 2026 21:42

@mk2023 mk2023 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM! Thanks so much for doing this!
This is the correct branch!

@stephenarosaj stephenarosaj left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

LGTM

@dconeybe
dconeybe merged commit 88d1774 into wine Jul 31, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants