mirror of
https://github.com/XRPLF/rippled.git
synced 2026-09-27 15:28:03 +00:00
fix(telemetry): satisfy clang-tidy on the noopMeter() helper
Static constants take the k prefix (readability-identifier-naming), and SpanGuardScope.cpp no longer names anything from <opentelemetry/metrics/noop.h> since it calls noopMeter(). Both fail CI under warnings-as-errors. The helper's docstring also claimed NoopMeterProvider hides the base two-argument GetMeter; it declares that overload itself, so the only detail worth sharing is the version. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
@@ -141,11 +141,9 @@ inline constexpr std::string_view kMeterVersion{"1.0.0"};
|
||||
* it: telemetry disabled, or an exporter that failed to build. Callers then
|
||||
* need no null check, because an instrument always comes back.
|
||||
*
|
||||
* Two details are easy to get wrong alone, which is why this is shared: the
|
||||
* provider must be reached through a base `MeterProvider` pointer, because
|
||||
* `NoopMeterProvider`'s override hides the base class's defaulted overload;
|
||||
* and the version must be @ref kMeterVersion, or the meter identity differs
|
||||
* from the one the histogram views select on.
|
||||
* Shared so every caller passes the same version, @ref kMeterVersion. A
|
||||
* different version gives a different meter identity from the one the
|
||||
* histogram views select on.
|
||||
*
|
||||
* @param name Instrumentation scope name to report.
|
||||
* @return An inert meter. Never empty.
|
||||
|
||||
Reference in New Issue
Block a user