fix(telemetry): address remaining clang-tidy and cspell CI failures

- Add "hicpp" to cspell dictionary for NOLINT annotations
- Concatenate nested namespaces in RpcSpanNames.h
- Fix include hygiene and nested ternary in RPCHandler.cpp

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Pratik Mankawde
2026-04-29 17:31:58 +01:00
parent 20fabbc0ec
commit 3ed22580fe
3 changed files with 10 additions and 11 deletions

View File

@@ -17,15 +17,16 @@
#include <xrpl/protocol/ErrorCodes.h>
#include <xrpl/protocol/jss.h>
#include <xrpl/resource/Fees.h>
#include <xrpl/server/InfoSub.h>
#include <xrpl/server/NetworkOPs.h>
#include <xrpl/telemetry/SpanGuard.h>
#include <xrpl/telemetry/SpanNames.h>
#include <atomic>
#include <chrono>
#include <cstdint>
#include <exception>
#include <string>
#include <string_view>
namespace xrpl {
using namespace telemetry;
@@ -214,10 +215,11 @@ doCommand(RPC::JsonContext& context, Json::Value& result)
Handler const* handler = nullptr;
if (auto error = fillHandler(context, handler))
{
std::string const cmdName = context.params.isMember(jss::command)
? context.params[jss::command].asString()
: context.params.isMember(jss::method) ? context.params[jss::method].asString()
: "unknown";
std::string cmdName = "unknown";
if (context.params.isMember(jss::command))
cmdName = context.params[jss::command].asString();
else if (context.params.isMember(jss::method))
cmdName = context.params[jss::method].asString();
auto span = SpanGuard::span(
TraceCategory::Rpc, rpc_span::prefix::command, rpc_span::val::unknownCommand);
span.setAttribute(rpc_span::attr::command, cmdName.c_str());

View File

@@ -20,9 +20,7 @@
#include <xrpl/telemetry/SpanNames.h>
namespace xrpl {
namespace telemetry {
namespace rpc_span {
namespace xrpl::telemetry::rpc_span {
// ===== Span prefixes =======================================================
@@ -69,6 +67,4 @@ inline constexpr auto user = makeStr("user");
inline constexpr auto unknownCommand = makeStr("unknown_command");
} // namespace val
} // namespace rpc_span
} // namespace telemetry
} // namespace xrpl
} // namespace xrpl::telemetry::rpc_span