Commit Graph

16432 Commits

Author SHA1 Message Date
Pratik Mankawde
9b1cd87d2e docs(telemetry): remove pre-squash references from the gap-fill comments
These comments dated themselves against this branch or against an earlier
revision of the same change, neither of which survives a squash merge.

- 'as of this branch' in the pricing-case doc and the pass-through static_assert
  becomes a statement about what the constants currently produce.
- 'Extracted from processGetObjectByHash()' and 'Split from start()' describe
  edits internal to this change; both now say why the method stands alone.
- Recording.h: the mock-abstract mismatch is a standing consequence of a member
  set that differs between builds, not something that 'has previously' happened.
- MetricsRegistry.cpp: describe the loops.txt entry as recording two cycles
  rather than as what ordering.txt 'previously had'.
- InboundLedger.h: the acquire span is the only signal for back-fill cost; it
  did not 'previously emit' nothing.
- check_bucket_parity.py: replace the eleven-phase drift story with the reason
  the check exists, and point the failure message at HistogramBuckets.h and the
  collector config instead of OpenTelemetryPlan/, which does not reach develop.

Comments and one error message only, no behaviour change.
2026-09-02 19:47:35 +01:00
Pratik Mankawde
07669a8eda merge: bring the guarded tx-tracing include forward from phase-8
Both sides added to the same guarded include block: this branch's
get-object metric names, and the tx-tracing header arriving from phase-3.
Kept both inside the one guard rather than taking a side.
2026-08-27 17:06:32 +01:00
Pratik Mankawde
ecbf8350fe Merge branch 'pratik/otel-phase7-native-metrics' into pratik/otel-phase8-log-correlation 2026-08-27 17:05:52 +01:00
Pratik Mankawde
0eccf294bc Merge branch 'pratik/otel-phase6-statsd' into pratik/otel-phase7-native-metrics 2026-08-27 17:05:52 +01:00
Pratik Mankawde
6283a1eb12 Merge branch 'pratik/otel-phase5-docs-deployment' into pratik/otel-phase6-statsd 2026-08-27 17:05:52 +01:00
Pratik Mankawde
606bfd596f Merge branch 'pratik/otel-phase4-consensus-tracing' into pratik/otel-phase5-docs-deployment 2026-08-27 17:05:51 +01:00
Pratik Mankawde
9ce6b7815d merge: bring the guarded tx-tracing include forward from phase-3
Both sides added a guarded include block at the same point in
PeerImp.cpp: this branch's consensus receive-span header, and phase-3's
tx-tracing header. Kept both in one guard with a comment covering the two
reasons, rather than taking a side and dropping an include the file needs.
2026-08-27 17:05:29 +01:00
Pratik Mankawde
af2b7812ef fix(ledger): value-initialize the acquisition counters on MSVC
Without telemetry the counters hold no state, so AcquireStats is
trivially default constructible. MSVC then rejects a const instance left
to the compiler-generated constructor (C4269, fatal under -Werror), and
clang-tidy reports the same type as an uninitialized member elsewhere.
Braces settle both.

Fixed at the two owners rather than by giving Counter a written-out
constructor: an empty counter has no state to be indeterminate, so this
is about what the compilers report, not about wrong values, and making
Counter non-trivial would need a modernize-use-equals-default
suppression in a header eleven files include.

MSVC is not available here, so C4269 itself is unverified locally; both
files compile under gcc with and without telemetry at -Werror -Wall
-Wextra, and the clang-tidy member-init finding is confirmed gone.
2026-08-27 17:02:33 +01:00
Pratik Mankawde
8984adc851 fix(telemetry): guard the TxTracing include for telemetry-off builds
TxTracing.h declares txReceiveSpan() and txProcessSpan(). Both call sites
sit inside an XRPL_ENABLE_TELEMETRY guard, so with telemetry off the header
is included but nothing from it is used, which clang-tidy reports as an
unused header. Guard the include the same way so it is still there for the
default build.
2026-08-27 17:02:06 +01:00
Pratik Mankawde
650a819377 fix(telemetry): keep the nodestore write-stats code clean without telemetry
clang-tidy runs over the whole tree in the build without telemetry, and
reported nine findings that no other configuration can see.

Eight are headers left included after the only code using them is
compiled out: scope.h in the backend, and scope.h, Types.h, WriteStats.h,
cstdint, latch, optional and thread in the test. Each moves into a
guarded group instead of being deleted, since all are needed when
telemetry is on.

The ninth is acquireStats_. Its counters hold no state without telemetry,
which leaves AcquireStats trivially default constructible, so the member
needs an explicit initializer to avoid indeterminate values.

Verified per file in both configurations: each finding reproduced before
the change and is gone after it, and every file compiles with and without
telemetry under -Werror -Wall -Wextra.
2026-08-27 16:57:33 +01:00
Pratik Mankawde
fda0935bdd test(telemetry): compile the overlapping-insert round only with telemetry
The round and its two constants are reached only from the write-stats
tests, which are inside the telemetry guard. Left outside it, the round
is an unused function in a build without telemetry, and -Werror rejects
it on both gcc and clang.

Moves the guard boundary rather than annotating the round, so the build
without telemetry carries no dead code. Mirrors NuDBBackend::recordInsert
on the production side, which is guarded for the same reason.
2026-08-27 16:12:10 +01:00
Pratik Mankawde
279ccd84d7 Merge branch 'pratik/otel-phase8-log-correlation' into pratik/otel-phase9-metric-gap-fill 2026-08-27 16:04:58 +01:00
Pratik Mankawde
cafaa9fe7b Merge branch 'pratik/otel-phase7-native-metrics' into pratik/otel-phase8-log-correlation 2026-08-27 16:04:36 +01:00
Pratik Mankawde
099109357f Merge branch 'pratik/otel-phase6-statsd' into pratik/otel-phase7-native-metrics 2026-08-27 16:04:36 +01:00
Pratik Mankawde
676c19b838 Merge branch 'pratik/otel-phase5-docs-deployment' into pratik/otel-phase6-statsd 2026-08-27 16:04:36 +01:00
Pratik Mankawde
f293f65bd0 Merge branch 'pratik/otel-phase4-consensus-tracing' into pratik/otel-phase5-docs-deployment 2026-08-27 16:01:02 +01:00
Pratik Mankawde
b060c76a76 Merge branch 'pratik/otel-phase3-tx-tracing' into pratik/otel-phase4-consensus-tracing 2026-08-27 16:01:01 +01:00
Pratik Mankawde
cc24101629 Merge branch 'pratik/otel-phase2-rpc-tracing' into pratik/otel-phase3-tx-tracing 2026-08-27 16:01:01 +01:00
Pratik Mankawde
189755bbb2 Merge branch 'pratik/otel-phase1c-rpc-integration' into pratik/otel-phase2-rpc-tracing 2026-08-27 16:00:26 +01:00
Pratik Mankawde
5dfee8564b Merge branch 'pratik/otel-phase1b-telemetry-infra' into pratik/otel-phase1c-rpc-integration 2026-08-27 16:00:26 +01:00
Pratik Mankawde
fff4124d9b Merge branch 'pratik/otel-phase1a-plan-docs' into pratik/otel-phase1b-telemetry-infra 2026-08-27 16:00:25 +01:00
Pratik Mankawde
078788af64 Merge remote-tracking branch 'origin/develop' into pratik/otel-phase1a-plan-docs 2026-08-27 15:59:56 +01:00
Pratik Mankawde
a31f0e07c1 Merge branch 'pratik/otel-phase8-log-correlation' into pratik/otel-phase9-metric-gap-fill 2026-08-27 15:57:48 +01:00
Pratik Mankawde
3ea45efbe4 Merge branch 'pratik/otel-phase7-native-metrics' into pratik/otel-phase8-log-correlation 2026-08-27 15:57:48 +01:00
Pratik Mankawde
840f8d61bc Merge branch 'pratik/otel-phase6-statsd' into pratik/otel-phase7-native-metrics 2026-08-27 15:57:48 +01:00
Pratik Mankawde
d3faaa9240 Merge branch 'pratik/otel-phase5-docs-deployment' into pratik/otel-phase6-statsd 2026-08-27 15:57:48 +01:00
Pratik Mankawde
12fe70a6d5 Merge branch 'pratik/otel-phase4-consensus-tracing' into pratik/otel-phase5-docs-deployment 2026-08-27 15:57:47 +01:00
Pratik Mankawde
0e5992af00 fix(consensus): mark the prior-round span context as possibly unused
startRoundTracing() is the only reader and writer of prevRoundSpanContext_,
and it is compiled out with telemetry, so a telemetry-off build sees an unused
private field and -Werror rejects it.

Marked rather than guarded: the two sibling span contexts are declared in both
configurations -- one of them escapes the warning only because an unguarded
accessor returns it -- and guarding this one alone would make the member set
depend on the build.
2026-08-27 15:54:13 +01:00
Pratik Mankawde
75a6bd7533 fix(nodestore): compile out recordInsert with the counters it folds
Every counter recordInsert() touches is declared only with telemetry compiled
in, and its one caller sits inside the same guard, but the method itself was
declared unconditionally. A telemetry-off build therefore failed to compile it:
concurrentWriters, insertCount, insertTotalUs and insertMaxUs are all
undeclared there.

Guard the method with the state it maintains.
2026-08-27 15:52:24 +01:00
Pratik Mankawde
eeac7330c5 fix(telemetry): include cstddef for pendingCount's return type
pendingCount() returns std::size_t and nothing in this file included
<cstddef>, so misc-include-cleaner fails the build. The check only reports on
a pull request's changed files, so the omission went unseen until an unrelated
edit brought this file back into scope.
2026-08-27 15:38:00 +01:00
Pratik Mankawde
7d1a0b7664 fix(telemetry): satisfy clang-tidy on the two sites this branch added
Two findings, both fatal under warnings-as-errors:

misc-const-correctness on the counter in counter_starts_at_zero, which only
ever reads it. Declare it const; the two counters that call add() stay
mutable.

readability-implicit-bool-conversion on the metrics-registry pointer in
setValidLedger's guarded block. Compare against nullptr explicitly.
2026-08-27 15:16:55 +01:00
Pratik Mankawde
18760845f1 fix(telemetry): classify a pending event before dropping it for the bound
A ledger reaches totalAgreements or totalMissed only when its event is
classified, which normally happens in reconcile() once the grace period has
elapsed. The insert-path bound erased the oldest entry outright, so an event
dropped before it was classified was counted as neither an agreement nor a
miss and both lifetime totals under-reported. MaxPendingEventsTrimming shows
it: 1100 recorded ledgers yielded 1000 agreements.

Move the classification into classifyPending() and call it from both places,
so a ledger reaches the totals exactly once whether reconcile() or the bound
resolves it. Add a test that records past the cap without reconciling and
asserts every evicted ledger still has a verdict -- the property the earlier
bound test missed, because it only checked the record-time counter.

Classifying on eviction fixes the verdict on whichever validations have
arrived, so one still in flight can no longer complete or repair it. That
only happens while over the bound, which means reconcile() is not running.
2026-08-27 15:13:25 +01:00
Jingchen
71f5555873 feat: Remove pseudo account field filter (#8042)
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-08-27 13:52:23 +00:00
Ayaz Salikhov
3967ed6d54 build: Update release-info to get better pkg_release (#8131) 2026-08-27 13:34:38 +00:00
Pratik Mankawde
e9001aedf0 Merge branch 'pratik/otel-phase8-log-correlation' into pratik/otel-phase9-metric-gap-fill
Conflicts in OTelCollector.h/.cpp: both sides correct the same wrong comments
about metric-name formatting, in different words. Kept this branch's wording,
which already covers every site -- verified no wrong claim survives and that
the two sides differ in comments only, with identical code.
2026-08-27 14:26:35 +01:00
Pratik Mankawde
076a28173f Merge branch 'pratik/otel-phase7-native-metrics' into pratik/otel-phase8-log-correlation 2026-08-27 14:25:02 +01:00
Pratik Mankawde
68ac7e0796 docs(telemetry): correct the OTelCollector comments about metric names
The class documented a name format it does not produce. Eleven comments said
the [insight] prefix is prepended, and gave examples like "xrpld_rpc_size" and
"xrpld_LedgerMaster_Validated_Ledger_Age" that also kept the original casing.

formatName() lowercases the raw instrument name and maps dots and spaces to
underscores, and applies no prefix. All four instrument factories go through
it, so "RPC.Size" exports as "rpc_size". prefix_ is written in the constructor
and read in one place, the startup log line, so nothing it holds can reach an
exported name. The service is identified by the service.name resource
attribute.

Comments only, in both the header and the implementation. The ASCII diagram
still lists prefix_ as a member, which it is.
2026-08-27 14:24:50 +01:00
Pratik Mankawde
811837a349 Merge branch 'pratik/otel-phase8-log-correlation' into pratik/otel-phase9-metric-gap-fill 2026-08-27 14:22:42 +01:00
Pratik Mankawde
b482626828 Merge branch 'pratik/otel-phase7-native-metrics' into pratik/otel-phase8-log-correlation 2026-08-27 14:22:42 +01:00
Pratik Mankawde
bb222a69b8 Merge branch 'pratik/otel-phase6-statsd' into pratik/otel-phase7-native-metrics 2026-08-27 14:22:42 +01:00
Pratik Mankawde
687c927adb docs(telemetry): describe only the utilities this header defines
The overview diagram and the thread-safety note named Mirror<T>, which this
header does not declare. Drop both mentions so the file documents what it
ships.
2026-08-27 14:22:27 +01:00
Pratik Mankawde
388dca05ed fix(overlay): name the proposal receive handle apart from the root span
onMessage(TMProposeSet) already owns a ScopedSpanGuard called span, the root
for the inbound peer message. The thread-free handle for the proposal receive
span was declared with the same name in the same scope, so the second
declaration conflicted with the first and every use of it -- the assignment,
the liveness test, the attribute writes and the job capture -- resolved
against the wrong type.

Call it proposalSpan. The validation handler already keeps its two apart the
same way, with valSpan for the root.
2026-08-27 14:21:35 +01:00
Pratik Mankawde
ba5f3f65ca fix(test): qualify attr in the node-id resource test
Two names spelled attr are visible in a unity translation unit that holds both
this file and the consensus span-name test: xrpl::telemetry::attr, which this
file's using-directive brings in, and xrpl::telemetry::consensus::span::attr,
which the other file's does. Unqualified attr:: is then ambiguous and the
translation unit does not compile.

Name telemetry::attr explicitly. That is unique -- the consensus one is nested
deeper -- so the reference no longer depends on which files a unity batch
happens to group together. attr is the only colliding name; xrpl::telemetry
declares no part, op, event or val for the other side to shadow.
2026-08-27 14:12:28 +01:00
Pratik Mankawde
9684c134d4 docs(telemetry): document the recording utilities
State that exists only to be reported was being written with preprocessor
branches at each site, which put #ifdef through business logic and gave the
owning class a different member set per build.

Document kEnabled, Stopwatch and Counter, and the two constraints that decide
whether they fit a site: a no-op method still evaluates its arguments, and
if constexpr still type-checks the branch it discards.
2026-08-27 14:07:44 +01:00
Pratik Mankawde
6a01f96877 Merge branch 'pratik/otel-phase4-consensus-tracing' into pratik/otel-phase5-docs-deployment 2026-08-27 14:04:50 +01:00
Pratik Mankawde
e8635f3452 Merge branch 'pratik/otel-phase3-tx-tracing' into pratik/otel-phase4-consensus-tracing 2026-08-27 14:04:50 +01:00
Pratik Mankawde
e350f79e72 Merge branch 'pratik/otel-phase7-native-metrics' into pratik/otel-phase8-log-correlation 2026-08-27 14:04:50 +01:00
Pratik Mankawde
5169f9c9f3 Merge branch 'pratik/otel-phase6-statsd' into pratik/otel-phase7-native-metrics 2026-08-27 14:04:50 +01:00
Pratik Mankawde
e85957da95 Merge branch 'pratik/otel-phase5-docs-deployment' into pratik/otel-phase6-statsd 2026-08-27 14:04:50 +01:00
Pratik Mankawde
38ecba8edc Merge branch 'pratik/otel-phase8-log-correlation' into pratik/otel-phase9-metric-gap-fill 2026-08-27 14:04:50 +01:00