From 3f294d72d6262ff3103663474440be055653d03b Mon Sep 17 00:00:00 2001 From: Daniel McCoy Stephenson Date: Fri, 25 Sep 2026 21:11:44 -0600 Subject: [PATCH 1/2] README: correct three claims that drifted from the code - A blank report name is ignored without a Logger mention; the promise table said every drop reaches the Logger. - Under Emscripten the reason is "unavailable" only when no earlier opt-out (environment, config, no key) applied. - The MSVC instructions built Debug but pointed at build/Release; add --config Release, as CI does. Co-Authored-By: Claude Opus 5.5 --- README.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index f414e31..6390215 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ trace.close(); | **Never throws** | Nothing in the client throws. A server that is down, slow, or rejecting the key — or a machine with no `curl` — is a dropped report, not an exception or a crash in your program. Drops are passed to the optional `Logger` (a `std::function`, last constructor argument), otherwise not mentioned at all. | | **Bounded** | At most 256 reports wait to be sent; past that, new ones are dropped. A trace server that is unreachable for a week costs a few kilobytes, not your memory. | | **`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 — a request still in flight then is abandoned and its `curl` process killed. `close(seconds)` takes a shorter bound. Once `close()` returns, the `Logger` is never called again. | -| **Fits the server's limits** | Names and tag keys/values are cut to 255 bytes (never mid-character), at most 32 tags are sent, blank tag keys are dropped, invalid UTF-8 becomes U+FFFD, and NaN or infinite values are left out — so a report is never rejected as a whole for one bad field. | +| **Fits the server's limits** | Names and tag keys/values are cut to 255 bytes (never mid-character), at most 32 tags are sent, blank tag keys are dropped, invalid UTF-8 becomes U+FFFD, and NaN or infinite values are left out — so a report is never rejected as a whole for one bad field. A report whose name is empty or blank is not an event at all: it is ignored, without a mention to the `Logger`. | ## Turning it off @@ -111,8 +111,8 @@ handful of events per session, which is what trace is for. A program that reports many events a second should use the libcurl transport. Under Emscripten (a browser build) there are no processes to spawn, so the -client is always disabled there, with reason `"unavailable"` — nothing is -lost, the desktop build reports. With `TRACE_CLIENT_USE_LIBCURL` the header +client is always disabled there, with reason `"unavailable"` unless one of the +opt-outs above applied first — nothing is lost, the desktop build reports. With `TRACE_CLIENT_USE_LIBCURL` the header also builds for platforms without `posix_spawn`. ## Getting it @@ -154,8 +154,9 @@ make test # system curl transport make test-libcurl # the TRACE_CLIENT_USE_LIBCURL transport ``` -or, where there is no make (MSVC), `cmake -S . -B build && cmake --build build` -and run `build/Release/test_trace_client`. +or, where there is no make (MSVC), +`cmake -S . -B build && cmake --build build --config Release` and run +`build/Release/test_trace_client`. Tests run the client against a small HTTP server written with plain sockets on a loopback port — no more dependencies than the client itself — and never From d5fc0b0c7471996f46d293439e2e55146fd03779 Mon Sep 17 00:00:00 2001 From: Daniel McCoy Stephenson Date: Fri, 25 Sep 2026 21:12:58 -0600 Subject: [PATCH 2/2] README: rewrap the Emscripten paragraph Co-Authored-By: Claude Opus 5.5 --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 6390215..8f8114c 100644 --- a/README.md +++ b/README.md @@ -112,8 +112,9 @@ reports many events a second should use the libcurl transport. Under Emscripten (a browser build) there are no processes to spawn, so the client is always disabled there, with reason `"unavailable"` unless one of the -opt-outs above applied first — nothing is lost, the desktop build reports. With `TRACE_CLIENT_USE_LIBCURL` the header -also builds for platforms without `posix_spawn`. +opt-outs above applied first — nothing is lost, the desktop build reports. +With `TRACE_CLIENT_USE_LIBCURL` the header also builds for platforms without +`posix_spawn`. ## Getting it