From a0a23f0b61febaafd4513537ee9ee9173934b590 Mon Sep 17 00:00:00 2001 From: Pratik Mankawde <3397372+pratikmankawde@users.noreply.github.com> Date: Fri, 18 Sep 2026 09:55:14 +0100 Subject: [PATCH 1/2] docs(telemetry): match the task list to where the receive span now starts The steps described setting a suppressed attribute on a dropped duplicate. The span is now created after the duplicate check, so there is no span on that path. --- OpenTelemetryPlan/Phase3_taskList.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/OpenTelemetryPlan/Phase3_taskList.md b/OpenTelemetryPlan/Phase3_taskList.md index 5224148814..601e0bd047 100644 --- a/OpenTelemetryPlan/Phase3_taskList.md +++ b/OpenTelemetryPlan/Phase3_taskList.md @@ -90,7 +90,7 @@ - Extract parent trace context from incoming `TMTransaction::trace_context` field (if present) - Create `tx.receive` span as child of extracted context (or new root if none) - Set attributes: `tx_hash`, `peer_id`, `tx_status` - - On HashRouter suppression (duplicate): set `suppressed=true`, add `tx.duplicate` event + - Create the span only after `HashRouter::shouldProcess()` accepts, so a dropped duplicate produces no span - Wrap validation call with child span `tx.validate` - Wrap relay with `tx.relay` span - When relaying to peers: @@ -159,7 +159,7 @@ - Edit `src/xrpld/overlay/detail/PeerImp.cpp` (in handleTransaction): - After calling `HashRouter::shouldProcess()` or `addSuppressionPeer()`: - - Record `suppressed` attribute (true/false) + - Start the span here, not before, so only transactions this node will process are traced - Record `tx_flags` showing current HashRouter state (SAVED, TRUSTED, etc.) - Add `tx.first_seen` or `tx.duplicate` event @@ -373,7 +373,7 @@ This gives the best of both worlds: guaranteed cross-node correlation via determ **combine** with deterministic trace_id — use the protobuf span_id as parent to preserve relay ordering, but override trace_id with the deterministic one. 4. If no protobuf context: create span under `detCtx` directly. - 5. Set all existing attributes (`hash`, `peerId`, `peerVersion`, `suppressed`, etc.). + 5. Set all existing attributes (`hash`, `peerId`, `peerVersion`, etc.). - **Combining deterministic trace_id with protobuf parent span_id**: When both are available, construct a synthetic `SpanContext` with: From 073ff1a93f093dd69b2e93f776d00a515eeb2f51 Mon Sep 17 00:00:00 2001 From: Pratik Mankawde <3397372+pratikmankawde@users.noreply.github.com> Date: Fri, 18 Sep 2026 09:55:45 +0100 Subject: [PATCH 2/2] docs(telemetry): drop the suppressed row from the attribute reference tx.receive does not set it. The span starts after the duplicate check, so a dropped copy produces no span for the attribute to sit on. --- OpenTelemetryPlan/09-data-collection-reference.md | 1 - 1 file changed, 1 deletion(-) diff --git a/OpenTelemetryPlan/09-data-collection-reference.md b/OpenTelemetryPlan/09-data-collection-reference.md index 9050e65aab..446204dc23 100644 --- a/OpenTelemetryPlan/09-data-collection-reference.md +++ b/OpenTelemetryPlan/09-data-collection-reference.md @@ -283,7 +283,6 @@ The tables below list one row per attribute per subsystem, so a key shared by tw | `tx_hash` | string | `tx.process`, `tx.receive` | Transaction hash (hex-encoded) | | `local` | boolean | `tx.process` | `true` if locally submitted, `false` if peer-relayed | | `path` | string | `tx.process` | Submission path: `"sync"` or `"async"` | -| `suppressed` | boolean | `tx.receive` | `true` if transaction was suppressed (duplicate) | | `tx_status` | string | `tx.receive` | Transaction status (e.g., `"known_bad"`) | | `peer_id` | int64 | `tx.receive` | Peer identifier (also set on peer spans) | | `peer_version` | string | `tx.receive` | Peer protocol version string |