Merge branch 'pratik/otel-phase5-docs-deployment' into pratik/otel-phase6-statsd

# Conflicts:
#	OpenTelemetryPlan/Phase3_taskList.md
#	docker/telemetry/grafana/provisioning/datasources/tempo.yaml
#	docs/telemetry-runbook.md
#	include/xrpl/proto/xrpl.proto
This commit is contained in:
Pratik Mankawde
2026-04-29 17:16:28 +01:00
10 changed files with 19 additions and 20 deletions

View File

@@ -33,7 +33,7 @@ or may not hold a value. For things not guaranteed to exist,
you use `x[~sfFoo]` because you want such a container. It
avoids having to look something up twice, once just to see if
it exists and a second time to get/set its value.
([Real example](https://github.com/XRPLF/rippled/blob/35f4698aed5dce02f771b34cfbb690495cb5efcc/src/xrpld/app/tx/impl/PayChan.cpp#L229-L236))
([Real example](https://github.com/XRPLF/rippled/blob/35f4698aed5dce02f771b34cfbb690495cb5efcc/src/ripple/app/tx/impl/PayChan.cpp#L229-L236))
The source of this "type magic" is in
[SField.h](./SField.h#L296-L302).

View File

@@ -24,8 +24,7 @@
#include <cstddef>
#include <string_view>
namespace xrpl {
namespace telemetry {
namespace xrpl::telemetry {
// ===== Compile-time string utility =========================================
@@ -117,5 +116,4 @@ inline constexpr auto error = makeStr("error");
inline constexpr auto followsFrom = makeStr("follows_from");
} // namespace attr_val
} // namespace telemetry
} // namespace xrpl
} // namespace xrpl::telemetry

View File

@@ -3,6 +3,11 @@
#include <gtest/gtest.h>
#include <cstdint>
#include <exception>
#include <stdexcept>
#include <utility>
using namespace xrpl;
using namespace xrpl::telemetry;
@@ -53,7 +58,7 @@ TEST(SpanGuardFactory, move_construction_transfers_ownership)
{
auto span = SpanGuard::span(TraceCategory::Rpc, "rpc", "move");
auto moved = std::move(span);
EXPECT_FALSE(span);
EXPECT_FALSE(span); // NOLINT(bugprone-use-after-move,hicpp-invalid-access-moved)
moved.setAttribute("key", "value");
}

View File

@@ -1,4 +1,5 @@
#include <xrpl/basics/BasicConfig.h>
#include <xrpl/beast/utility/Journal.h>
#include <xrpl/telemetry/Telemetry.h>
#include <gtest/gtest.h>
@@ -9,7 +10,7 @@ using namespace xrpl;
TEST(TelemetryConfig, setup_defaults)
{
telemetry::Telemetry::Setup s;
telemetry::Telemetry::Setup const s;
EXPECT_FALSE(s.enabled);
EXPECT_EQ(s.serviceName, "xrpld");
EXPECT_TRUE(s.serviceVersion.empty());
@@ -32,7 +33,7 @@ TEST(TelemetryConfig, setup_defaults)
TEST(TelemetryConfig, parse_empty_section)
{
Section section;
Section const section;
auto setup = telemetry::setup_Telemetry(section, "nHUtest123", "2.0.0", 0);
EXPECT_FALSE(setup.enabled);
@@ -92,7 +93,7 @@ TEST(TelemetryConfig, null_telemetry_factory)
setup.enabled = false;
beast::Journal::Sink& sink = beast::Journal::getNullSink();
beast::Journal j(sink);
beast::Journal const j(sink);
auto tel = telemetry::make_Telemetry(setup, j);
EXPECT_TRUE(tel != nullptr);
EXPECT_FALSE(tel->isEnabled());

View File

@@ -53,7 +53,7 @@ private:
// name of state database
std::string const dbName_ = "state";
// prefix of on-disk nodestore backend instances
std::string const dbPrefix_ = "xrpldb"; // cspell: disable-line
std::string const dbPrefix_ = "rippledb"; // cspell: disable-line
// check health/stop status as records are copied
std::uint64_t const checkHealthInterval_ = 1000;
// minimum # of ledgers to maintain for health of network

View File

@@ -249,7 +249,7 @@ getSingleSection(
//------------------------------------------------------------------------------
char const* const Config::configFileName = "xrpld.cfg";
char const* const Config::configLegacyName = "xrpld.cfg";
char const* const Config::configLegacyName = "rippled.cfg";
char const* const Config::databaseDirName = "db";
char const* const Config::validatorsFileName = "validators.txt";

View File

@@ -41,9 +41,7 @@
#include <xrpl/telemetry/SpanNames.h>
namespace xrpl {
namespace telemetry {
namespace pathfind_span {
namespace xrpl::telemetry::pathfind_span {
// ===== Span prefixes =======================================================
@@ -85,6 +83,4 @@ inline constexpr auto numRequests = join(xrplPathfind, makeStr("num_requests"));
inline constexpr auto ledgerIndex = join(xrplPathfind, makeStr("ledger_index"));
} // namespace attr
} // namespace pathfind_span
} // namespace telemetry
} // namespace xrpl
} // namespace xrpl::telemetry::pathfind_span

View File

@@ -35,7 +35,6 @@
#include <xrpl/resource/Consumer.h>
#include <xrpl/server/InfoSub.h>
#include <xrpl/server/LoadFeeTrack.h>
#include <xrpl/server/NetworkOPs.h>
#include <xrpl/telemetry/SpanGuard.h>
#include <xrpl/tx/paths/RippleCalc.h>

View File

@@ -18,7 +18,7 @@ Json::Value
doPathFind(RPC::JsonContext& context)
{
using namespace telemetry;
auto span = SpanGuard::span(
[[maybe_unused]] auto span = SpanGuard::span(
TraceCategory::Rpc, pathfind_span::prefix::pathfind, pathfind_span::op::request);
if (context.app.config().PATH_SEARCH_MAX == 0)
return rpcError(rpcNOT_SUPPORTED);

View File

@@ -26,7 +26,7 @@ Json::Value
doRipplePathFind(RPC::JsonContext& context)
{
using namespace telemetry;
auto span = SpanGuard::span(
[[maybe_unused]] auto span = SpanGuard::span(
TraceCategory::Rpc, pathfind_span::prefix::pathfind, pathfind_span::op::request);
if (context.app.config().PATH_SEARCH_MAX == 0)
return rpcError(rpcNOT_SUPPORTED);