mirror of
https://github.com/XRPLF/rippled.git
synced 2026-07-24 07:30:30 +00:00
chore(telemetry): normalize remaining triple-slash Doxygen comments
Convert leading /// blocks in these 9 phase3-originating files to house style /** */ (using the updated fix_doxy.py that now handles /// -> block conversion). Comment-only: code is byte-identical. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -4,7 +4,8 @@
|
||||
|
||||
#include <string_view>
|
||||
|
||||
/** Contract tests for the transaction apply-pipeline span constants.
|
||||
/**
|
||||
* Contract tests for the transaction apply-pipeline span constants.
|
||||
*
|
||||
* The span names and attribute keys in TxApplySpanNames.h are a cross-component
|
||||
* contract: the collector spanmetrics connector aggregates on these exact
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
/** Compile-time span name constants for Transaction Queue tracing.
|
||||
/**
|
||||
* Compile-time span name constants for Transaction Queue tracing.
|
||||
*
|
||||
* Covers the TxQ lifecycle: enqueue decisions, direct apply, batch
|
||||
* clear, ledger-close accept loop, per-tx apply, and cleanup.
|
||||
@@ -55,7 +56,9 @@ namespace xrpl::telemetry::txq_span {
|
||||
// ===== Span prefixes =======================================================
|
||||
|
||||
namespace prefix {
|
||||
/// "txq" — root prefix for transaction queue spans.
|
||||
/**
|
||||
* "txq" — root prefix for transaction queue spans.
|
||||
*/
|
||||
inline constexpr auto txq = makeStr("txq");
|
||||
} // namespace prefix
|
||||
|
||||
@@ -73,29 +76,51 @@ inline constexpr auto cleanup = makeStr("cleanup");
|
||||
// ===== Attribute keys ======================================================
|
||||
|
||||
namespace attr {
|
||||
/// Canonical shared constants (defined in SpanNames.h).
|
||||
/**
|
||||
* Canonical shared constants (defined in SpanNames.h).
|
||||
*/
|
||||
using ::xrpl::telemetry::attr::ledgerSeq;
|
||||
using ::xrpl::telemetry::attr::txHash;
|
||||
|
||||
/// "txq_status" — domain-qualified (collides with tx_status, rpc_status).
|
||||
/**
|
||||
* "txq_status" — domain-qualified (collides with tx_status, rpc_status).
|
||||
*/
|
||||
inline constexpr auto txqStatus = makeStr("txq_status");
|
||||
/// "fee_level_paid" — fee level paid by queued tx.
|
||||
/**
|
||||
* "fee_level_paid" — fee level paid by queued tx.
|
||||
*/
|
||||
inline constexpr auto feeLevelPaid = makeStr("fee_level_paid");
|
||||
/// "required_fee_level" — minimum fee level for inclusion.
|
||||
/**
|
||||
* "required_fee_level" — minimum fee level for inclusion.
|
||||
*/
|
||||
inline constexpr auto requiredFeeLevel = makeStr("required_fee_level");
|
||||
/// "queue_size" — current TxQ depth.
|
||||
/**
|
||||
* "queue_size" — current TxQ depth.
|
||||
*/
|
||||
inline constexpr auto queueSize = makeStr("queue_size");
|
||||
/// "ledger_changed" — whether ledger changed since last attempt.
|
||||
/**
|
||||
* "ledger_changed" — whether ledger changed since last attempt.
|
||||
*/
|
||||
inline constexpr auto ledgerChanged = makeStr("ledger_changed");
|
||||
/// "expired_count" — number of expired entries cleared.
|
||||
/**
|
||||
* "expired_count" — number of expired entries cleared.
|
||||
*/
|
||||
inline constexpr auto expiredCount = makeStr("expired_count");
|
||||
/// "ter_code" — transaction engine result code.
|
||||
/**
|
||||
* "ter_code" — transaction engine result code.
|
||||
*/
|
||||
inline constexpr auto terCode = makeStr("ter_code");
|
||||
/// "retries_remaining" — retries left before discard.
|
||||
/**
|
||||
* "retries_remaining" — retries left before discard.
|
||||
*/
|
||||
inline constexpr auto retriesRemaining = makeStr("retries_remaining");
|
||||
/// "num_cleared" — entries cleared in batch.
|
||||
/**
|
||||
* "num_cleared" — entries cleared in batch.
|
||||
*/
|
||||
inline constexpr auto numCleared = makeStr("num_cleared");
|
||||
/// "tx_type" — transaction type name (e.g., "Payment", "OfferCreate").
|
||||
/**
|
||||
* "tx_type" — transaction type name (e.g., "Payment", "OfferCreate").
|
||||
*/
|
||||
inline constexpr auto txType = makeStr("tx_type");
|
||||
} // namespace attr
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
/** Helpers for injecting trace context into protobuf messages.
|
||||
/**
|
||||
* Helpers for injecting trace context into protobuf messages.
|
||||
*
|
||||
* Bridges the gap between SpanGuard (which hides OTel types) and the
|
||||
* protobuf TraceContext message used for cross-node propagation.
|
||||
@@ -13,7 +14,7 @@
|
||||
* | |
|
||||
* injectSpanContext(span, proto)
|
||||
*
|
||||
* @note When XRPL_ENABLE_TELEMETRY is disabled, getTraceBytes() returns
|
||||
* @note When XRPL_ENABLE_TELEMETRY is disabled, getTraceBytes() returns
|
||||
* {.valid=false}, so injectSpanContext becomes a no-op with zero overhead.
|
||||
*
|
||||
* Usage:
|
||||
@@ -25,8 +26,8 @@
|
||||
* overlay.relay(txID, tx, toSkip);
|
||||
* @endcode
|
||||
*
|
||||
* @see TxTracing.h for receive-side extraction helpers.
|
||||
* @see TraceContextPropagator.h for low-level OTel context serialization.
|
||||
* @see TxTracing.h for receive-side extraction helpers.
|
||||
* @see TraceContextPropagator.h for low-level OTel context serialization.
|
||||
*/
|
||||
|
||||
#include <xrpl/proto/xrpl.pb.h>
|
||||
@@ -34,7 +35,8 @@
|
||||
|
||||
namespace xrpl::telemetry {
|
||||
|
||||
/** Inject trace context from an active SpanGuard into a protobuf
|
||||
/**
|
||||
* Inject trace context from an active SpanGuard into a protobuf
|
||||
* TraceContext message for cross-node propagation.
|
||||
*
|
||||
* Reads the span's trace_id, span_id, and trace_flags via
|
||||
@@ -42,8 +44,8 @@ namespace xrpl::telemetry {
|
||||
* Safe to call from any thread that holds a reference to the span.
|
||||
* No-op if the span is null or inactive.
|
||||
*
|
||||
* @param span The active SpanGuard whose context to propagate.
|
||||
* @param proto The protobuf TraceContext to populate.
|
||||
* @param span The active SpanGuard whose context to propagate.
|
||||
* @param proto The protobuf TraceContext to populate.
|
||||
*/
|
||||
inline void
|
||||
injectSpanContext(SpanGuard const& span, protocol::TraceContext& proto)
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
/** Compile-time span name constants for transaction tracing.
|
||||
/**
|
||||
* Compile-time span name constants for transaction tracing.
|
||||
*
|
||||
* Used by PeerImp (overlay) and NetworkOPs (app) for transaction
|
||||
* lifecycle spans. Built on StaticStr/join() from SpanNames.h.
|
||||
@@ -22,7 +23,9 @@ namespace xrpl::telemetry::tx_span {
|
||||
// ===== Span prefixes =======================================================
|
||||
|
||||
namespace prefix {
|
||||
/// "tx" — root prefix for transaction lifecycle spans.
|
||||
/**
|
||||
* "tx" — root prefix for transaction lifecycle spans.
|
||||
*/
|
||||
inline constexpr auto tx = seg::tx;
|
||||
} // namespace prefix
|
||||
|
||||
@@ -41,29 +44,51 @@ inline constexpr auto process = join(prefix::tx, op::process);
|
||||
// ===== Attribute keys ======================================================
|
||||
|
||||
namespace attr {
|
||||
/// Canonical shared constants (defined in SpanNames.h).
|
||||
/**
|
||||
* Canonical shared constants (defined in SpanNames.h).
|
||||
*/
|
||||
using ::xrpl::telemetry::attr::peerId;
|
||||
using ::xrpl::telemetry::attr::txHash;
|
||||
|
||||
/// "local" — whether tx originated locally.
|
||||
/**
|
||||
* "local" — whether tx originated locally.
|
||||
*/
|
||||
inline constexpr auto local = makeStr("local");
|
||||
/// "path" — sync or async processing path.
|
||||
/**
|
||||
* "path" — sync or async processing path.
|
||||
*/
|
||||
inline constexpr auto path = makeStr("path");
|
||||
/// "suppressed" — whether tx was suppressed as duplicate.
|
||||
/**
|
||||
* "suppressed" — whether tx was suppressed as duplicate.
|
||||
*/
|
||||
inline constexpr auto suppressed = makeStr("suppressed");
|
||||
/// "tx_status" — domain-qualified (collides with rpc_status, txq_status).
|
||||
/**
|
||||
* "tx_status" — domain-qualified (collides with rpc_status, txq_status).
|
||||
*/
|
||||
inline constexpr auto txStatus = makeStr("tx_status");
|
||||
/// "peer_version" — version of peer that sent the tx.
|
||||
/**
|
||||
* "peer_version" — version of peer that sent the tx.
|
||||
*/
|
||||
inline constexpr auto peerVersion = makeStr("peer_version");
|
||||
/// "tx_type" — transaction type name (e.g., "Payment", "OfferCreate").
|
||||
/**
|
||||
* "tx_type" — transaction type name (e.g., "Payment", "OfferCreate").
|
||||
*/
|
||||
inline constexpr auto txType = makeStr("tx_type");
|
||||
/// "fee" — transaction fee in drops.
|
||||
/**
|
||||
* "fee" — transaction fee in drops.
|
||||
*/
|
||||
inline constexpr auto fee = makeStr("fee");
|
||||
/// "sequence" — transaction sequence number.
|
||||
/**
|
||||
* "sequence" — transaction sequence number.
|
||||
*/
|
||||
inline constexpr auto sequence = makeStr("sequence");
|
||||
/// "ter_result" — engine result code after application.
|
||||
/**
|
||||
* "ter_result" — engine result code after application.
|
||||
*/
|
||||
inline constexpr auto terResult = makeStr("ter_result");
|
||||
/// "applied" — whether the transaction was applied to the ledger.
|
||||
/**
|
||||
* "applied" — whether the transaction was applied to the ledger.
|
||||
*/
|
||||
inline constexpr auto applied = makeStr("applied");
|
||||
} // namespace attr
|
||||
|
||||
@@ -73,16 +98,24 @@ namespace val {
|
||||
inline constexpr auto sync = makeStr("sync");
|
||||
inline constexpr auto async = makeStr("async");
|
||||
inline constexpr auto knownBad = makeStr("known_bad");
|
||||
/// Transaction was suppressed via HashRouter (duplicate, not flagged bad).
|
||||
/**
|
||||
* Transaction was suppressed via HashRouter (duplicate, not flagged bad).
|
||||
*/
|
||||
inline constexpr auto suppressed = makeStr("suppressed");
|
||||
/// Transaction was rejected because it carried tfInnerBatchTxn, which
|
||||
/// must never appear in network-relayed traffic.
|
||||
/**
|
||||
* Transaction was rejected because it carried tfInnerBatchTxn, which
|
||||
* must never appear in network-relayed traffic.
|
||||
*/
|
||||
inline constexpr auto rejectedInnerBatch = makeStr("rejected_inner_batch");
|
||||
/// Transaction was dropped because the validated ledger is too old to
|
||||
/// confidently apply new transactions (server is out of sync).
|
||||
/**
|
||||
* Transaction was dropped because the validated ledger is too old to
|
||||
* confidently apply new transactions (server is out of sync).
|
||||
*/
|
||||
inline constexpr auto droppedNoSync = makeStr("dropped_no_sync");
|
||||
/// Transaction was dropped because the local job queue for jtTRANSACTION
|
||||
/// is at MAX_TRANSACTIONS — backpressure on the receive side.
|
||||
/**
|
||||
* Transaction was dropped because the local job queue for jtTRANSACTION
|
||||
* is at MAX_TRANSACTIONS — backpressure on the receive side.
|
||||
*/
|
||||
inline constexpr auto droppedQueueFull = makeStr("dropped_queue_full");
|
||||
} // namespace val
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
/** Helper functions for creating transaction trace spans.
|
||||
/**
|
||||
* Helper functions for creating transaction trace spans.
|
||||
*
|
||||
* Encapsulates the logic for creating SpanGuard instances with
|
||||
* hash-derived trace IDs and optional protobuf parent extraction.
|
||||
@@ -21,7 +22,8 @@
|
||||
|
||||
namespace xrpl::telemetry {
|
||||
|
||||
/** Create a "tx.receive" span for a transaction received from a peer.
|
||||
/**
|
||||
* Create a "tx.receive" span for a transaction received from a peer.
|
||||
* trace_id is derived from txID[0:16]. If the incoming message carries
|
||||
* a protobuf TraceContext with a valid span_id, it is used as the
|
||||
* parent to preserve relay ordering.
|
||||
@@ -53,7 +55,8 @@ txReceiveSpan(uint256 const& txID, [[maybe_unused]] protocol::TMTransaction cons
|
||||
TraceCategory::Transactions, tx_span::receive, txID.data(), txID.kBytes);
|
||||
}
|
||||
|
||||
/** Create a "tx.process" span for transaction processing in NetworkOPs.
|
||||
/**
|
||||
* Create a "tx.process" span for transaction processing in NetworkOPs.
|
||||
* trace_id is derived from txID[0:16].
|
||||
*/
|
||||
inline SpanGuard
|
||||
|
||||
Reference in New Issue
Block a user