Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ generates, reads or writes an ID.
| Property | Meaning |
|---|---|
| **Returns immediately** | The HTTP call runs on one daemon thread the client owns. A Spigot plugin can report from the server thread and no tick waits on the network. |
| **Never throws** | A server that is down, slow, or rejecting the key is a dropped report, not an exception in your program. Drops are logged at `FINE` if you gave a logger, otherwise not at all. |
| **Never throws** | A server that is down, slow, or rejecting the key is a dropped report, not an exception in your program. Such a failure is logged at `FINE` if you gave a logger, otherwise not at all. |
| **Bounded** | At most 256 reports wait to be sent; past that, new ones are dropped without a log line, even at `FINE`. A trace server that is unreachable for a week costs a few kilobytes, not your heap. |
| **Throttled** | Repeats of one event within a minute are counted, not sent: the first goes out at once, the rest as one event when the minute is up. See [below](#repeated-events-are-coalesced). |
| **`close()` drains** | Reports already queued get up to the client timeout (5 s total) to be sent before the thread stops, so a CLI that reports and exits at once does not lose its event. Still bounded: an unreachable server delays exit by at most the timeout. |
Expand Down
8 changes: 5 additions & 3 deletions src/main/java/software/stephenson/trace/TraceClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,8 @@ ServerWideConfig readFromDisk(boolean created) {

/**
* Ensures {@code <pluginsDirectory>/trace/config.yml} exists and reads its
* {@code enabled:} line and {@code tags:} block. No YAML library: the file
* {@code enabled:} line, {@code tags:} block and {@code server-id:} line.
* Not called when the environment opts out. No YAML library: the file
* is ours, shallow, and a line scan is enough. Anything going wrong on
* disk is logged at FINE and counts as enabled with no tags -- a
* read-only plugins directory must not silently switch reporting off,
Expand Down Expand Up @@ -1123,8 +1124,9 @@ public Builder enabled(boolean enabled) {
* server-id: 0f8b6c1e-...
* </pre>
*
* <p>Both are read once, here. Optional; programs that are not
* plugins leave it unset.
* <p>All three are read once, here. When an environment variable has
* already turned reporting off, the file is neither read nor created.
* Optional; programs that are not plugins leave it unset.
*/
public Builder serverWideConfig(File pluginsDirectory) {
this.pluginsDirectory = pluginsDirectory;
Expand Down
Loading