mirror of
https://github.com/XRPLF/rippled.git
synced 2026-06-03 00:36:48 +00:00
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:
@@ -117,6 +117,7 @@ words:
|
||||
- gpgcheck
|
||||
- gpgkey
|
||||
- hotwallet
|
||||
- hicpp
|
||||
- hwaddress
|
||||
- hwrap
|
||||
- ifndef
|
||||
|
||||
@@ -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());
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user