From 1a2f9a71f5c8affd885eedd31f49cf3d145b9524 Mon Sep 17 00:00:00 2001 From: Pratik Mankawde <3397372+pratikmankawde@users.noreply.github.com> Date: Wed, 3 Jun 2026 16:02:04 +0100 Subject: [PATCH] feat(telemetry): add ter_result and applied attributes to tx.process span MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Enriches the tx.process span with final outcome after batch application: - ter_result: the TER code string (e.g., "tesSUCCESS", "tecPATH_DRY") - applied: boolean whether the transaction was included in the ledger These attributes complete the tx.process span lifecycle — it now captures identity (tx_type, tx_hash), intent (fee, sequence), and outcome (ter_result, applied) for full workflow traceability. Co-Authored-By: Claude Opus 4.6 --- src/xrpld/app/misc/NetworkOPs.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/xrpld/app/misc/NetworkOPs.cpp b/src/xrpld/app/misc/NetworkOPs.cpp index 6650ba6196..08f7f018d3 100644 --- a/src/xrpld/app/misc/NetworkOPs.cpp +++ b/src/xrpld/app/misc/NetworkOPs.cpp @@ -1563,6 +1563,11 @@ NetworkOPsImp::apply(std::unique_lock& batchLock) auto newOL = registry_.get().getOpenLedger().current(); for (TransactionStatus const& e : transactions) { + if (e.span && *e.span) + { + e.span->setAttribute(tx_span::attr::terResult, transToken(e.result).c_str()); + e.span->setAttribute(tx_span::attr::applied, e.applied); + } e.transaction->clearSubmitResult(); if (e.applied)