Send a random installation ID with usage reports (trace-client-java 0.6.0) - #58
Merged
Merged
Conversation
….6.0) Re-vendor the trace client at 0.6.0 and pass it TRACE_INSTALL_ID (when set) and a per-user trace-install-id file, which the client resolves after its opt-out checks, so every event carries the tag `install` and trace can count installations rather than events. A disabled client never makes up, reads or writes an ID. The README's usage-reporting section says what the ID is, where it lives, and how to reset it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014ztkfamsbEqQfcu76me5SL
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.
Every usage report now carries a random per-installation ID as the tag
install, so trace can count installations rather than events. The vendored trace client is re-vendored at trace-client-java 0.6.0 (package line kept).TRACE_INSTALL_IDwhen it is set and not blank (so an operator can pin one per deployment); otherwise Parpt's own per-user directory,~/.config/parpt/trace-install-id, next to the existing notice marker (Parpt has no other settings file on disk). A new random UUID is written there the first time reporting runs and reused after that.installId(...)/installIdFile(...)), and the client resolves them after its own opt-out checks. When reporting is off (the program's own switch,TRACE_USAGE_REPORTING=off,DO_NOT_TRACK=1, or no key), no ID is made up and the file is neither read nor written. A file that cannot be read or written yields an in-memory ID for that run; startup never fails over it.TraceInstallId(next to the vendored client) readsTRACE_INSTALL_IDand resolves the per-user data directory ($XDG_DATA_HOMEor~/.local/shareon Linux/BSD,~/Library/Application Supporton macOS,%APPDATA%on Windows). It never touches the disk itself; here only itsTRACE_INSTALL_IDreader and file-name constant are used, since the ID lives in the program's own directory.UsageReporterTestnow expects theinstalltag (read back from the file) onproject-created; a new test checks the file is written next to the marker only when enabled and reused on the next start;TraceInstallIdTestcovers the helper../gradlew build --no-daemon (JDK 21)— 144 tests, 0 failures.🤖 Generated with Claude Code
https://claude.ai/code/session_014ztkfamsbEqQfcu76me5SL
drafted by Claude on behalf of Daniel Stephenson