diff --git a/README.md b/README.md index 4c015cc..480c837 100644 --- a/README.md +++ b/README.md @@ -125,9 +125,9 @@ starts no thread and costs nothing; the first that applies is the reason: `client.disabledReason()` says which one applied — `"environment"`, `"config"` or `"no key"`, or `"unavailable"` when the client cannot send at all (a -browser build, a blank base URL, application name or version, a version over -255 bytes, or the thread could -not be started) — and is empty when the client reports, so a program can print it. +browser build, a blank base URL, application name or version, a version or +explicit installation ID over 255 bytes, or the thread could not be started) — +and is empty when the client reports, so a program can print it. A default-constructed `TraceClient` is disabled with reason `"config"`. A disabled client also never makes up or writes an [installation ID](#every-event-carries-a-random-installation-id). diff --git a/trace_client.hpp b/trace_client.hpp index 7250205..fac8349 100644 --- a/trace_client.hpp +++ b/trace_client.hpp @@ -259,10 +259,6 @@ inline std::string number(double value) { return text; } -/** - * The report body. JSON is written by hand so this file has no dependencies; - * the shape is fixed and small, three scalars and a flat string map. - */ /** The tag every event carries the installation's ID as. */ static const char *const INSTALL_TAG = "install"; @@ -350,6 +346,10 @@ inline void makeParentDirectories(const std::string &path) { } } +/** + * The report body. JSON is written by hand so this file has no dependencies; + * the shape is fixed and small, three scalars and a flat string map. + */ inline std::string json(const std::string &application, const std::string &name, bool hasValue, double value, const Tags &tags) { std::string out = "{\"application\":" + quote(cleanUtf8(application, std::string::npos));