feat(telemetry): add ter_result and applied attributes to tx.process span

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 <noreply@anthropic.com>
This commit is contained in:
Pratik Mankawde
2026-06-03 16:02:04 +01:00
parent ebf107e73c
commit 1a2f9a71f5

View File

@@ -1563,6 +1563,11 @@ NetworkOPsImp::apply(std::unique_lock<std::mutex>& 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)