From f6f0e722241ad931d16485e520ddaa1497aa14aa Mon Sep 17 00:00:00 2001 From: Pratik Mankawde <3397372+pratikmankawde@users.noreply.github.com> Date: Tue, 21 Jul 2026 20:39:29 +0100 Subject: [PATCH] docs(telemetry): DeterministicIdGenerator is active via hashSpan, not dormant The generator's doc said it was 'dormant, caller lands on a later branch'. Reworded to branch-agnostic language: hashSpan() is the primary caller that forces the root branch to mint deterministic trace roots. Co-Authored-By: Claude Opus 4.8 (1M context) --- include/xrpl/telemetry/DeterministicIdGenerator.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/include/xrpl/telemetry/DeterministicIdGenerator.h b/include/xrpl/telemetry/DeterministicIdGenerator.h index 6e83054797..d284a2d4b4 100644 --- a/include/xrpl/telemetry/DeterministicIdGenerator.h +++ b/include/xrpl/telemetry/DeterministicIdGenerator.h @@ -55,11 +55,12 @@ namespace xrpl::telemetry { * @note Limitation: minting a deterministic root only works when the caller * forces the SDK's root branch (e.g. by starting the span with a * Context{kIsRootSpanKey, true}); otherwise the SDK reuses the parent's - * trace_id and never calls GenerateTraceId(). That caller (hashSpan) lands on - * a later branch, so this generator is installed but dormant here. + * trace_id and never calls GenerateTraceId(). The primary such caller is + * SpanGuard::hashSpan(), which forces the root branch to mint deterministic + * per-object trace roots. * - * Example 1 - primary use, inside a forced-root hash span (arrives on a later - * branch; shown as pseudocode): + * Example 1 - primary use, inside a forced-root hash span (shown as + * pseudocode): * @code * // std::array id = deriveTraceIdFromHash(txHash); * // PendingTraceId const pending{id}; // pin id for this thread @@ -128,8 +129,7 @@ public: * guards on one thread is unsupported: the inner guard consumes/clears first, * so the outer id is silently dropped and its destructor trips the assert. * - * Example 1 - primary use, wrapping a forced-root span start (pseudocode; the - * caller lands on a later branch): + * Example 1 - primary use, wrapping a forced-root span start (pseudocode): * @code * // { * // PendingTraceId const pending{id}; // pin for this scope