mirror of
https://github.com/XRPLF/rippled.git
synced 2026-09-27 23:38:08 +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:
@@ -705,9 +705,9 @@ noopMeter(std::string_view name)
|
||||
{
|
||||
// One provider for the process: it holds a single inert meter, so nothing
|
||||
// is gained by building another.
|
||||
static auto const provider = opentelemetry::nostd::shared_ptr<metrics_api::MeterProvider>(
|
||||
static auto const kProvider = opentelemetry::nostd::shared_ptr<metrics_api::MeterProvider>(
|
||||
new metrics_api::NoopMeterProvider());
|
||||
return provider->GetMeter(std::string(name), std::string(kMeterVersion));
|
||||
return kProvider->GetMeter(std::string(name), std::string(kMeterVersion));
|
||||
}
|
||||
|
||||
opentelemetry::exporter::otlp::OtlpHttpExporterOptions
|
||||
|
||||
@@ -41,7 +41,6 @@
|
||||
#include <opentelemetry/exporters/memory/in_memory_span_exporter_factory.h>
|
||||
#include <opentelemetry/metrics/meter.h>
|
||||
#include <opentelemetry/metrics/meter_provider.h>
|
||||
#include <opentelemetry/metrics/noop.h>
|
||||
#include <opentelemetry/nostd/shared_ptr.h>
|
||||
#include <opentelemetry/nostd/variant.h>
|
||||
#include <opentelemetry/sdk/resource/resource.h>
|
||||
|
||||
Reference in New Issue
Block a user