gvfs-helper: emit X-Session-Id headers for requests#862
Merged
mjcheetham merged 2 commits intomicrosoft:vfs-2.53.0from Mar 27, 2026
Merged
gvfs-helper: emit X-Session-Id headers for requests#862mjcheetham merged 2 commits intomicrosoft:vfs-2.53.0from
mjcheetham merged 2 commits intomicrosoft:vfs-2.53.0from
Conversation
mjcheetham
reviewed
Mar 23, 2026
d93d2d1 to
f78ee34
Compare
mjcheetham
previously approved these changes
Mar 27, 2026
Member
|
@derrickstolee looks like only a whitespace issue is left. (We can ignore the CodeQL failure - this is a know issue with the setup.) |
In order to assist with tracking user experience between the Git client and the GVFS Protocol servers, start sending the SID for the client Git process over the wire as the X-Session-Id header. Insert this header to all curl requests for each protocol. Signed-off-by: Derrick Stolee <stolee@gmail.com>
In different engineering systems, there may already be pseudonymous identifiers stored in the local Git config. For Office and 1JS, this is present in the 'otel.trace2.id' config value. We'd like to be able to collect server-side telemetry based on these pseudonymous identifiers, so prefxing the X-Session-Id header with this value is helpful. We could create a single 'gvfs.sessionPrefix' config key that stores this value, but then we'd need to duplicate the identifier and risk drift in the value. For now, we create this indirection by saying "what config _key_ should Git use to look up the value to add as a prefix?" Signed-off-by: Derrick Stolee <stolee@gmail.com>
f78ee34 to
efe07e3
Compare
mjcheetham
approved these changes
Mar 27, 2026
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.
A common problem when tracking GVFS Protocol queries is that we don't have a way to connect client and server interactions. This is especially true in the typical case where a cache server deployment is hidden behind a load balancer. We can't even determine which cache server was used for certain requests!
Add some client-identifying data to the HTTP queries using the X-Session-Id header. This will by default identify the helper process using its SID. If configured via the new gvfs.sessionKey config, it will prefix this SID with another config value.
For example, Office monorepo users have an 'otel.trace2.id' config value that is a pseudonymous identifier. This allows telemetry readers to group requests by enlistment without knowing the user's identity at all. Users could opt-in to provide this identifier for investigations around their long-term performance or issues. This change makes it possible to extend this to cache server interactions.
GVFS Protocol.