diff --git a/include/xrpl/telemetry/SpanGuard.h b/include/xrpl/telemetry/SpanGuard.h index 030c8f5829..804503c401 100644 --- a/include/xrpl/telemetry/SpanGuard.h +++ b/include/xrpl/telemetry/SpanGuard.h @@ -14,7 +14,6 @@ +-------------------------------------------+ | - impl_ : unique_ptr (pimpl) | +-------------------------------------------+ - | + span(name) : SpanGuard [static] | | + span(cat, prefix, name) [static] | | + childSpan(name) : SpanGuard | | + linkedSpan(name) : SpanGuard | @@ -194,12 +193,6 @@ public: // --- Static factory methods ---------------------------------------- - /** Create an unconditional span (always created if telemetry is on). - @param name Full span name (e.g. "app.startup"). - */ - static SpanGuard - span(std::string_view name); - /** Create a span guarded by a TraceCategory flag. The span name is built as "prefix.name". Returns a null guard if the category is disabled in config. @@ -329,11 +322,6 @@ public: SpanGuard& operator=(SpanGuard const&) = delete; - static SpanGuard - span(std::string_view) - { - return {}; - } static SpanGuard span(TraceCategory, std::string_view, std::string_view) { diff --git a/src/libxrpl/telemetry/SpanGuard.cpp b/src/libxrpl/telemetry/SpanGuard.cpp index 6381d8a469..22c210c7c5 100644 --- a/src/libxrpl/telemetry/SpanGuard.cpp +++ b/src/libxrpl/telemetry/SpanGuard.cpp @@ -20,8 +20,9 @@ #ifdef XRPL_ENABLE_TELEMETRY -#include #include + +#include #include #include @@ -131,15 +132,6 @@ isCategoryEnabled(Telemetry const& tel, TraceCategory cat) return false; // unreachable, silences compiler warning } -SpanGuard -SpanGuard::span(std::string_view name) -{ - auto* tel = Telemetry::getInstance(); - if (!tel || !tel->isEnabled()) - return {}; - return SpanGuard(std::make_unique(tel->startSpan(name))); -} - SpanGuard SpanGuard::span(TraceCategory cat, std::string_view prefix, std::string_view name) {