Repository navigation
Releases: Stephenson-Software/trace-client-java
Release list
0.6.1
Point the usage-reporting link at https://danielstephenson.dev/usage-reporting (the old link pointed at a private repository and returned 404).
0.6.0
Programs that aren't Spigot plugins can now persist their installation ID: Builder.installIdFile(File). The file is resolved only after every opt-out check.
- How the file is read: its first line matching
[A-Za-z0-9_.-]{1,255}is the ID. When the file is missing or has no such line, a random UUID is written to it, creating parent directories as needed. - Failures never throw: if the file exists but can't be read, an in-memory ID is used and the file is left untouched. If the write fails, an in-memory ID is used.
- Precedence: explicit
installId(...), theninstallIdFile(...), then the server-wideserver-id:(Spigot). - Static helper:
TraceClient.installIdFromFile(File)does the same load-or-create step. Called directly, it writes even when reporting is off, so prefer the builder option.
Brings the Java client to parity with python 0.4.0, js 0.4.0, csharp 0.3.0 and cpp 0.3.0.
drafted by Claude on behalf of Daniel Stephenson
0.5.0
Every event now carries a random per-installation ID as the tag install, so the trace server can count distinct servers instead of raw events.
- Spigot plugins: the ID is the
server-id:line inplugins/trace/config.yml. The first enabled client that finds none generates aUUID.randomUUID()and appends it, under a comment explaining it; the rest of the file is left exactly as it was. If the file can't be written, the ID is kept in memory for that run only. - Other programs: pass an ID with
Builder.installId(String). Without one, noinstalltag is sent. - Privacy: the ID is random and identifies no person, account or IP address. Delete the
server-id:line to get a new one. Every opt-out (TRACE_USAGE_REPORTING=off,DO_NOT_TRACK=1,enabled: false) stops it: a disabled client never generates or writes an ID. - An event's own
installtag wins, andinstallis not added to an event that already has 32 tags. installId()returns the ID in use, or null.
Re-vendor TraceClient.java to pick it up. Nothing else about the API changes. Plugin READMEs should mention the ID in their Usage reporting section.
drafted by Claude on behalf of Daniel Stephenson
0.4.0
Every event now carries the program's own version as the tag version, so each event can be tied to a release. That covers command events and any other, not just a hand-tagged startup. An event's own version tag wins, and a server-wide version tag never replaces it.
Breaking: builder(baseUrl, application, version) now requires the version (blank or over 255 characters throws), and the two-argument builder is gone. In a Bukkit plugin, upgrading is one argument: getDescription().getVersion().
Also included: build() no longer throws when the plugins folder path can't be converted (#8). The server-wide config is read inside the existing failure handling instead.
Re-vendor TraceClient.java to pick it up. Most plugins already vendor the 0.4.0 code from main; this tag makes that a real release.
drafted by Claude on behalf of Daniel Stephenson
0.3.0
The server-wide file plugins/trace/config.yml can now carry a tags: block. Those tags are added to every event that every plugin on the server reports. An automated test server marks itself like this:
enabled: true
tags:
ci: "true"A plugin's own tag of the same name always wins. Invalid entries are dropped, and the total per event stays within the server's limit of 32 tags. A malformed file never throws and never turns reporting off. A newly created file now also holds the example, commented out, so nothing changes by default.
This release also adds TraceClient.VERSION (0.3.0), which is now used in the User-Agent.
Re-vendor TraceClient.java to pick it up. Nothing else about the API changes, and 0.2.0 files keep reading only the enabled: line.
drafted by Claude on behalf of Daniel Stephenson
0.1.1
close() now sends reports that are still queued before stopping (bounded by the 5 s read timeout, then shutdownNow()), instead of discarding them. A single report was already safe on this client; a backlog of several was not. Aligns with trace-client-python 0.1.1. Re-vendor TraceClient.java to pick it up; nothing else changes.
drafted by Claude on behalf of Daniel Stephenson
0.1.0
First release. One class, no dependencies, Java 8: TraceClient.builder(baseUrl, application).key(...).enabled(...).logger(...).build() then report(name[, value, tags]). Returns immediately, never throws, queue bounded at 256; no key or enabled(false) is a no-op.
JitPack coordinates: com.github.Stephenson-Software:trace-client-java:0.1.0.
drafted by Claude on behalf of Daniel Stephenson