Repository navigation
Tag every event with the program's version (0.2.0) - #2
Merged
Merged
Conversation
The constructor now takes the program's own version as a required third argument, right after the application name. It is trimmed; null, blank, or longer than 255 characters after trimming throws ArgumentException. Every event is sent with the tag `version` set to it, unless the event carries its own `version` tag, which wins. The caller's tags are copied, never modified. TraceClient.Disabled() uses an internal placeholder version. The User-Agent still carries the client's version. Mirrors trace-client-java PR #5. Breaking change: 0.1.0 -> 0.2.0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AuTszT2gqv7nLVYrtKD4ji
dmccoystephenson
force-pushed
the
program-version-on-every-event
branch
from
September 30, 2026 03:29
03217d1 to
d5fd1c3
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
Every event the C# client sends now carries the program's own version as the tag
version, mirroring trace-client-java PR #5.new TraceClient(baseUrl, "my-game", "1.4.0", key: ..., enabled: ..., log: ...).It is trimmed; null, blank, or longer than 255 characters after trimming throws
ArgumentException.version= that value. An event's ownversiontag wins. The caller's tags are copied (WithVersion), never modified.TraceClient.Disabled()still constructs, with an internal placeholder version.versiontag counts toward the server's 32-tag limit, so an event may now carry 31 tags of its own (the size test was updated accordingly, as in the Java change).Versionconstant, csproj, file header, README).Note for consumers: a 0.1.0 call that passed the key positionally (
new TraceClient(url, app, key)) would now compile with the key in the version slot. The README example passeskey,enabledandlogby name, and the upgrade note says so.Docs
README example passes the version; new "Every event carries the program's version" section; wire-format example and the XML doc comment example no longer hand-tag
versiononstartup.Testing
dotnet test -c Release -p:IncludeNetFramework=false(the CI Linux leg, .NET SDK 8.0.424): 50 passed, 0 failed. Existing tests were moved to the new signature and expected bodies; new tests cover the trimmed version on acommandevent, an event's own version winning, the caller's dictionary not being mutated, and null/blank/overlong versions being rejected.Reportfailed 5 of 50 tests; ignoring an event's ownversionfailed 1; removing the version validation/trimming failed 2. Each was restored and the suite returned to all passing.🤖 Generated with Claude Code
https://claude.ai/code/session_01AuTszT2gqv7nLVYrtKD4ji
drafted by Claude on behalf of Daniel Stephenson