Merge branch 'pratik/otel-phase4-consensus-tracing' into pratik/otel-phase5-docs-deployment

This commit is contained in:
Pratik Mankawde
2026-04-29 18:20:19 +01:00
5 changed files with 14 additions and 8 deletions

View File

@@ -79,6 +79,7 @@
#include <xrpl/protocol/BuildInfo.h>
#include <xrpl/protocol/Feature.h>
#include <xrpl/protocol/Protocol.h>
#include <xrpl/protocol/PublicKey.h>
#include <xrpl/protocol/STParsedJSON.h>
#include <xrpl/protocol/Serializer.h>
#include <xrpl/protocol/jss.h>

View File

@@ -50,6 +50,7 @@
#include <sstream>
#include <stdexcept>
#include <string>
#include <string_view>
#include <utility>
#include <vector>

View File

@@ -20,9 +20,7 @@
#include <xrpl/telemetry/SpanNames.h>
namespace xrpl {
namespace telemetry {
namespace grpc_span {
namespace xrpl::telemetry::grpc_span {
// ===== Span prefixes =======================================================
@@ -59,6 +57,4 @@ inline constexpr auto resourceExhausted = makeStr("resource_exhausted");
inline constexpr auto failedPrecondition = makeStr("failed_precondition");
} // namespace val
} // namespace grpc_span
} // namespace telemetry
} // namespace xrpl
} // namespace xrpl::telemetry::grpc_span

View File

@@ -215,11 +215,19 @@ doCommand(RPC::JsonContext& context, Json::Value& result)
Handler const* handler = nullptr;
if (auto error = fillHandler(context, handler))
{
std::string cmdName = "unknown";
std::string cmdName;
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();
}
else
{
cmdName = "unknown";
}
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

@@ -8,7 +8,7 @@
#include <xrpld/rpc/detail/RpcSpanNames.h>
#include <xrpld/rpc/detail/Tuning.h>
#include <xrpld/rpc/detail/WSInfoSub.h>
#include <xrpld/rpc/json_body.h>
#include <xrpld/rpc/json_body.h> // IWYU pragma: keep
#include <xrpl/basics/Log.h>
#include <xrpl/basics/base64.h>