From a5120091700e20cfd59db9686721af11eca1e354 Mon Sep 17 00:00:00 2001 From: Pratik Mankawde <3397372+pratikmankawde@users.noreply.github.com> Date: Sat, 11 Jul 2026 17:59:33 +0100 Subject: [PATCH] fix(telemetry): replace std::format with string concat for gcc-12 libstdc++ ships starting with gcc-13, so std::format in SpanGuard::span() fails to compile on gcc-12. Build the "." span name via std::string::append instead and drop the include. Co-Authored-By: Claude Opus 4.8 (1M context) --- src/libxrpl/telemetry/SpanGuard.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/libxrpl/telemetry/SpanGuard.cpp b/src/libxrpl/telemetry/SpanGuard.cpp index 26c14c20be..2fc0760124 100644 --- a/src/libxrpl/telemetry/SpanGuard.cpp +++ b/src/libxrpl/telemetry/SpanGuard.cpp @@ -37,7 +37,6 @@ #include #include -#include #include #include #include @@ -177,7 +176,9 @@ SpanGuard::span(TraceCategory cat, std::string_view prefix, std::string_view nam auto* tel = Telemetry::getInstance(); if ((tel == nullptr) || !tel->isEnabled() || !isCategoryEnabled(*tel, cat)) return {}; - auto fullName = std::format("{}.{}", prefix, name); + std::string fullName; + fullName.reserve(prefix.size() + 1 + name.size()); + fullName.append(prefix).append(1, '.').append(name); return SpanGuard(std::make_unique(tel->startSpan(fullName, categoryToSpanKind(cat)))); }