Add client analytics headers#301
Merged
Merged
Conversation
8d6b5e7 to
ef9e3c9
Compare
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.
Summary
X-BTAA-Client-*attribution andUser-Agentvalues.wsimplementation is available.qgisand cover the expected analytics headers in tests.Why
The analytics program needs stable first-party client attribution across desktop and MCP clients, not only browser and SSR traffic. These headers let downstream analytics distinguish QGIS, MCP HTTP bridge, and MCP WebSocket bridge requests.
Impact
MCP bridge and QGIS traffic can now be attributed with explicit client name, version, channel, and optional instance metadata. The WebSocket bridge warns when it falls back to a WebSocket implementation that cannot attach custom handshake headers.
Validation
/Users/ewlarson/.cache/codex-runtimes/codex-primary-runtime/dependencies/node/bin/node --test mcp/client_headers.test.js mcp/mcp_http_bridge.test.js mcp/mcp_websocket_bridge.test.js/Users/ewlarson/.pyenv/versions/3.13.1/bin/python -m pytest qgis-plugin/testsNote:
python -m pytest qgis-plugin/testspassed with an existing pytest-asyncio deprecation warning aboutasyncio_default_fixture_loop_scope.