diff --git a/src/libxrpl/tx/applySteps.cpp b/src/libxrpl/tx/applySteps.cpp index f2f99e9536..0a7197c20c 100644 --- a/src/libxrpl/tx/applySteps.cpp +++ b/src/libxrpl/tx/applySteps.cpp @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include @@ -102,18 +103,24 @@ makeStageSpan( { span.setAttribute(telemetry::tx_apply_span::attr::stage, stage); if (char const* typeName = txTypeName(tx.getTxnType())) + { span.setAttribute(telemetry::tx_apply_span::attr::txType, typeName); + } // The ledger being worked on — set only by the view-bearing stages // (preclaim/transactor). Preflight is stateless and passes nullopt, so // it carries no ledger attribute (documented exception). if (curLedgerSeq) + { span.setAttribute( telemetry::tx_apply_span::attr::currentLedgerSeq, static_cast(*curLedgerSeq)); - if (curLedgerParentHash) + } + if (curLedgerParentHash != nullptr) + { span.setAttribute( telemetry::tx_apply_span::attr::currentLedgerHash, to_string(*curLedgerParentHash).c_str()); + } } return span; }