[.NET] Identify the SDK in the User-Agent header - #653
Open
ivanvyd wants to merge 1 commit into
Open
Conversation
The identifier was sent only when the caller supplied one, so a default-configured client reported the Rust core's own identifier and .NET traffic was attributed to Rust server-side. Go and C++ both stamp theirs unconditionally. Captured against the mock server: zerobus-sdk-rs/2.6.0 before, zerobus-sdk-dotnet/0.1.0 after. An explicit SdkIdentifier() still takes precedence. Signed-off-by: Ivan Vydrin <ivan.vydrin.99@gmail.com>
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.
What changes are proposed in this pull request?
.NET clients identify themselves as
zerobus-sdk-rs/<version>on the wire.Build()sent the SDK identifier only when the caller set one, andSdkIdentifier()is documented for wrapper SDKs rather than end-user code, so it stays unset and the core falls back to its own default.Server-side, that attributes .NET traffic to Rust: .NET adoption is unmeasurable, and logs for a .NET customer name the wrong SDK. Go and C++ already stamp theirs unconditionally.
Before:
After:
How is this tested?
Four integration tests on the existing mock gRPC server, asserting the
user-agentheader the server received.dotnet test: 210 passed, 0 failed, across net8.0 and net10.0.End to end, I ran a pre-fix and a post-fix build against a live Zerobus endpoint on Azure Databricks; both ingested successfully.