docs(consensus): drop pre-squash comparisons from the tracing comments

Both comments pointed at a state the squash merge does not publish.

- Consensus.h: 'yields a null guard, same as before' had no antecedent in the
  round or the function. Say instead that a null guard makes the setAttribute
  calls below no-ops, which is what SpanGuard's impl_ guard does.
- ConsensusSpanLabels.h: 'Split from ConsensusSpanNames.h' describes a split
  performed entirely within this change; both headers first appear here. The
  dependency rationale and the diagram are unchanged.

Comments only, no behaviour change.
This commit is contained in:
Pratik Mankawde
2026-09-02 19:46:27 +01:00
parent 7d875c0e76
commit bbfde30eb1
2 changed files with 8 additions and 6 deletions

View File

@@ -1689,8 +1689,9 @@ Consensus<Adaptor>::updateOurPositions(std::unique_ptr<std::stringstream> const&
// NOLINTBEGIN(bugprone-unchecked-optional-access) assert above
using namespace telemetry;
// Child of the establish span via its captured context (establishSpan_ is
// a thread-free SpanGuard, so parent explicitly via its context). Null
// context (establish not started) yields a null guard, same as before.
// a thread-free SpanGuard, so parent explicitly via its context). A null
// context — the establish phase has not started — yields a null guard, so
// the setAttribute calls below are no-ops.
auto span = SpanGuard::childSpan(consensus::span::updatePositions, establishSpanContext_);
span.setAttribute(
consensus::span::attr::convergePercent, static_cast<int64_t>(convergePercent_));

View File

@@ -3,10 +3,11 @@
/**
* Enum-to-label mappings for consensus span attribute values.
*
* Split from ConsensusSpanNames.h so that header stays dependency-free like
* its siblings: the span-name and attribute-key constants are included by
* overlay and app translation units that have no use for the consensus
* enums, while these mappings are needed only by Consensus.h.
* These mappings live in their own header so ConsensusSpanNames.h stays
* dependency-free like its siblings: the span-name and attribute-key
* constants are included by overlay and app translation units that have no
* use for the consensus enums, while these mappings are needed only by
* Consensus.h.
*
* ConsensusSpanNames.h (constants only, no domain deps)
* ^