feat(telemetry): add peer version attribute to tx.receive spans (Task 3.7)

Tag transaction receive spans with the relaying peer's rippled version
to enable version-mismatch correlation during network upgrades.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Pratik Mankawde
2026-03-31 12:13:36 +01:00
parent 8dcb03d73b
commit c93e16a413

View File

@@ -1357,6 +1357,8 @@ PeerImp::handleTransaction(
{
XRPL_TRACE_TX(app_.getTelemetry(), "tx.receive");
XRPL_TRACE_SET_ATTR("xrpl.peer.id", static_cast<int64_t>(id_));
if (auto const version = getVersion(); !version.empty()) // LCOV_EXCL_LINE
XRPL_TRACE_SET_ATTR("xrpl.peer.version", version.c_str()); // LCOV_EXCL_LINE
XRPL_ASSERT(eraseTxQueue != batch, ("xrpl::PeerImp::handleTransaction : valid inputs"));
if (tracking_.load() == Tracking::diverged)