diff --git a/include/xrpl/beast/insight/Unit.h b/include/xrpl/beast/insight/Unit.h index cd9c863d1e..3993663b9b 100644 --- a/include/xrpl/beast/insight/Unit.h +++ b/include/xrpl/beast/insight/Unit.h @@ -21,7 +21,7 @@ namespace beast::insight { * makeEvent("size", Unit::Bytes) --> OTel unit "By" --> byte ladder * * The StatsD backend deliberately ignores this and keeps emitting `|ms` for - * every Event. That path is retired here -- its UDP port is commented out of + * every Event. That path is out of service -- its UDP port is commented out of * the compose file and the integration test fails if anything is listening on * 8125 -- so changing its wire format would alter a legacy contract for no * local benefit and with no way to verify it. diff --git a/include/xrpl/telemetry/HistogramBuckets.h b/include/xrpl/telemetry/HistogramBuckets.h index 381362034e..0f453d54a3 100644 --- a/include/xrpl/telemetry/HistogramBuckets.h +++ b/include/xrpl/telemetry/HistogramBuckets.h @@ -12,9 +12,9 @@ namespace xrpl::telemetry::buckets { * @brief Explicit histogram bucket edges for xrpld's OTel instruments. * * One header owns every ladder so a reviewer sees all of them at once and a - * test can assert their invariants. Before this existed the edges lived as - * file-local `namespace {}` constants, unreachable from any test, and they - * drifted apart. + * test can assert their invariants. The alternative -- file-local + * `namespace {}` constants at each registration site -- is unreachable from + * any test and lets the ladders drift apart. * * Why a ladder is worth this much care: when a quantile falls in the `+Inf` * bucket, Prometheus returns the *second-highest* edge, not `+Inf`. A @@ -68,11 +68,11 @@ namespace xrpl::telemetry::buckets { * **This list must contain every representable edge of the collector's * spanmetrics ladder, and may extend above it.** Agreement over the shared * range is deliberate: it lets a span-derived latency panel and a native - * histogram panel be read on the same scale. It was specified that way - * originally, then silently broken when the collector ladder alone was - * extended, which left this side capped at 5 s while spans reached 30 s and - * censored every quantile above 5 s. `check_bucket_parity.py` now enforces - * the containment -- add a collector edge, add it here too. + * histogram panel be read on the same scale. `check_bucket_parity.py` + * machine-checks the containment, because a ladder that agrees only by + * convention drifts the first time one side is extended alone, and a top edge + * below the collector's censors every quantile above it. Add a collector edge, + * add it here too. * * The sub-millisecond edges the collector carries (0.01 to 0.5 ms) are * deliberately absent. `beast::insight::Event` rounds every duration up to @@ -86,8 +86,9 @@ namespace xrpl::telemetry::buckets { * as 5 s censors them today. All these Events share one ladder, so its * ceiling has to cover the slowest member rather than the typical one. * - * The 2, 3 and 4 s edges resolve second-scale work that previously had to - * interpolate across a single four-second-wide bucket. + * The 2, 3 and 4 s edges subdivide the 1 s to 5 s span, so second-scale work + * resolves to about a second rather than being interpolated across a single + * four-second-wide bucket. */ inline constexpr std::array kMillisecondBuckets{ 1.0, diff --git a/src/libxrpl/beast/insight/OTelCollector.cpp b/src/libxrpl/beast/insight/OTelCollector.cpp index d8c70241f1..be0311ca78 100644 --- a/src/libxrpl/beast/insight/OTelCollector.cpp +++ b/src/libxrpl/beast/insight/OTelCollector.cpp @@ -5,7 +5,7 @@ * Compiled only when XRPL_ENABLE_TELEMETRY is defined (via CMake * telemetry=ON). Maps beast::insight instruments to OTel SDK instruments * created on the GLOBAL Meter published by the telemetry module. This class - * is a legacy shim: it no longer owns an export pipeline. The MeterProvider, + * is an adapter only: it owns no export pipeline. The MeterProvider, * PeriodicExportingMetricReader, OTLP exporter and histogram view all live in * xrpl::telemetry::Telemetry. * @@ -380,7 +380,7 @@ private: //------------------------------------------------------------------------------ /** - * @brief Main OTel Collector implementation (legacy shim). + * @brief Main OTel Collector implementation (adapter over the global Meter). * * Obtains its Meter from the GLOBAL MeterProvider owned and published by the * telemetry module (xrpl::telemetry::Telemetry), rather than building its own @@ -445,8 +445,8 @@ public: * * @param endpoint OTLP/HTTP metrics endpoint URL. Informational only: * the global telemetry pipeline is authoritative for - * the actual export endpoint. Retained for logging and - * back-compat with the New() signature. + * the actual export endpoint. Used only in the startup + * log line. * @param prefix Legacy metric-name prefix. Not applied to metric * names; used only in the startup log line. * @param instanceId Value for the service.instance.id resource attribute. diff --git a/src/libxrpl/telemetry/Telemetry.cpp b/src/libxrpl/telemetry/Telemetry.cpp index cac48144a9..fc8928c8ed 100644 --- a/src/libxrpl/telemetry/Telemetry.cpp +++ b/src/libxrpl/telemetry/Telemetry.cpp @@ -409,7 +409,7 @@ class TelemetryImpl : public Telemetry // One histogram view per unit. The unit is the selector, so an // instrument gets the ladder that fits what it measures -- a byte - // count no longer inherits a latency ladder. Edges come from + // count gets the byte ladder instead of a latency one. Edges come from // HistogramBuckets.h, which owns every ladder. // // Both views keep the "*" name pattern and an EMPTY view name: a