Commit Graph

17029 Commits

Author SHA1 Message Date
Pratik Mankawde
d2cefa05d9 fix(telemetry): make the load generators fail loudly instead of exiting 0
Three ways a run could produce no traffic and still report success:

- tx_submitter logged a funding shortfall and returned an empty stats object;
  main() then printed the summary and exited 0, so the failure only surfaced
  later as "spans missing", which points nowhere. It now records setup_failed in
  the summary and exits 1 after the report is written.
- --weights was checked for valid JSON but not for a positive sum. An all-zero
  mapping reached random.choices, which raises ValueError from inside the
  dispatch loop where only CancelledError is caught. Rejected at parse time now,
  in both generators.
- a profile phase declaring neither rpc nor tx logged a warning and returned no
  error. Both error rates short-circuit to 0.0 when nothing was sent, so a
  mistyped key produced zero traffic and still passed the exit gate. That phase
  is now an error.
2026-09-09 13:14:44 +01:00
Pratik Mankawde
d9427c2539 Merge branch 'pratik/otel-phase9-metric-gap-fill' into pratik/otel-phase10-workload-validation 2026-09-09 12:02:30 +01:00
Pratik Mankawde
144dcfe5a8 Merge branch 'pratik/otel-phase8-log-correlation' into pratik/otel-phase9-metric-gap-fill 2026-09-09 12:02:30 +01:00
Pratik Mankawde
4a7ce8585b Merge branch 'pratik/otel-phase7-native-metrics' into pratik/otel-phase8-log-correlation 2026-09-09 12:02:22 +01:00
Pratik Mankawde
b978b52028 Merge branch 'pratik/otel-phase6-statsd' into pratik/otel-phase7-native-metrics 2026-09-09 12:02:22 +01:00
Pratik Mankawde
f318191b18 Merge branch 'pratik/otel-phase5-docs-deployment' into pratik/otel-phase6-statsd 2026-09-09 12:02:12 +01:00
Pratik Mankawde
8b0bd8839d Merge branch 'pratik/otel-phase4-consensus-tracing' into pratik/otel-phase5-docs-deployment 2026-09-09 12:02:12 +01:00
Pratik Mankawde
148d126c63 Merge branch 'pratik/otel-phase3-tx-tracing' into pratik/otel-phase4-consensus-tracing 2026-09-09 12:01:59 +01:00
Pratik Mankawde
0eb4291688 fix(telemetry): drive the collection lifecycle in the StatsD tests
A StatsDCollector polls its metrics only after onCollectionReady(), so
neither test flushed anything: the gauge test timed out and the counter test
passed for the wrong reason. Call it in both, and drop the two includes
whose symbols the file never names.
2026-09-09 12:01:44 +01:00
Pratik Mankawde
302a76f73e fix(telemetry): make the readability probe stream const
The stream is only tested for failure, and both operator bool and operator!
are const members.
2026-09-09 12:01:42 +01:00
Pratik Mankawde
08a1ab8cd3 fix(telemetry): drop the unused <string> include from NullTelemetry
The file names only std::string_view, which <string_view> already provides.
2026-09-09 12:01:39 +01:00
Pratik Mankawde
96a3495328 fix(telemetry): brace the direct-apply status branch in TxQ
clang-tidy's readability-braces-around-statements exempts statements of at
most two lines, but not an if/else chain. Brace both arms.
2026-09-09 12:01:36 +01:00
Pratik Mankawde
738b5905fd merge: bring the CI fixes forward from phase9-metric-gap-fill 2026-09-08 17:22:19 +01:00
Pratik Mankawde
bae31955db merge: bring the CI fixes forward from phase8-log-correlation
One conflicted file, docs/telemetry-runbook.md, with three spots:

- Build section: both sides added different text at one point. Kept both,
  incoming sentence first, then this branch's "Run against a live network".
- Disabling section, first spot: this branch's wording names the config
  section and says no rebuild is needed, so it already covers the incoming
  sentence.
- Disabling section, second spot: kept this branch's paragraph and folded in
  the one point it lacked, that both flags have to be passed.
2026-09-08 17:22:04 +01:00
Pratik Mankawde
75f2d042f4 merge: bring the CI fixes forward from phase7-native-metrics 2026-09-08 17:19:40 +01:00
Pratik Mankawde
ff1a905ede merge: bring the CI fixes forward from phase6-statsd
Three conflicts, all resolved by keeping this branch's rewrite and
re-applying the incoming change onto it:

- 09-data-collection-reference.md: phase-7 rewrote both attribute tables,
  so the incoming table would have reverted them. Kept phase-7's and
  re-applied the two "XRPL epoch" spellings.
- integration-test.sh: phase-7 moved these checks from StatsD to OTel and
  no longer defines check_statsd_metric, so only this side compiles.
- TelemetryConfig.cpp: the incoming side carried networkTypeFromId(), which
  this branch already has. Kept one definition and took the incoming
  doc wording, which the auto-merged body below it already matches.
2026-09-08 17:17:50 +01:00
Pratik Mankawde
e612e5d9fa merge: bring the CI fixes forward from phase5-docs-deployment 2026-09-08 17:14:06 +01:00
Pratik Mankawde
6528b02469 merge: bring the CI fixes forward from phase4-consensus-tracing 2026-09-08 17:14:06 +01:00
Pratik Mankawde
2ec09abf12 merge: bring the CI fixes forward from phase3-tx-tracing 2026-09-08 17:13:51 +01:00
Pratik Mankawde
b0fd72619a merge: bring the CI fixes forward from phase2-rpc-tracing 2026-09-08 17:13:51 +01:00
Pratik Mankawde
55ae890efd merge: bring the CI fixes forward from phase1c-rpc-integration 2026-09-08 17:13:51 +01:00
Pratik Mankawde
5190f643fa merge: bring the CI fixes forward from phase1b-telemetry-infra 2026-09-08 17:13:41 +01:00
Pratik Mankawde
cf719f224d merge: bring the CI fixes forward from phase1a-plan-docs 2026-09-08 17:13:41 +01:00
Pratik Mankawde
f3dc5c4e27 fix(test): compare the trace strategy against its enumerator
getConsensusTraceStrategy() returns ConsensusTraceStrategy, so comparing
it to a string literal does not compile.

No coverage is lost: strategyName()'s spelling has its own assertions in
the TelemetryConfig test, in this same binary.
2026-09-08 17:13:08 +01:00
Pratik Mankawde
bfa9f1b1e0 fix(test): rename the tlsPath namespace to tls_path
readability-identifier-naming wants lower_case for a namespace, so
clang-tidy failed on this file under warnings-as-errors. All seven use
sites move with the declaration.
2026-09-08 17:13:06 +01:00
Pratik Mankawde
23c1a6f5dd fix(docs): spell it "XRPL epoch" in the data-collection reference
The rename script rewrites "Ripple epoch" to "XRPL epoch", so the old
spelling in a tracked .md makes the check-rename job fail on a dirty tree.

The attribute keys are left alone: the script's pattern needs a space, and
those keys are a cross-layer contract.
2026-09-08 17:12:55 +01:00
Pratik Mankawde
25362d3b6a fix(docs): spell it "XRPL epoch" in the close-time attribute notes
The rename script rewrites "Ripple epoch" to "XRPL epoch", so the old
spelling in a tracked .md makes the check-rename job fail on a dirty tree.

The attribute keys are left alone: the script's pattern needs a space, and
those keys are a cross-layer contract.
2026-09-08 17:12:53 +01:00
Pratik Mankawde
0ed0c01021 fix(docs): spell it "XRPL epoch" in the ledger attribute table
The rename script rewrites "Ripple epoch" to "XRPL epoch", so the old
spelling in a tracked .md makes the check-rename job fail on a dirty tree.

The attribute key close_time_ripple_epoch_s is left alone: the script's
pattern needs a space, and that key is a cross-layer contract.
2026-09-08 17:12:40 +01:00
Pratik Mankawde
9c9cb9d091 fix(telemetry): check TLS paths and fix the runbook build steps
requireReadableFile proved a path readable with getFileContents, which
loads the whole file into a std::string and then drops it. One of the
three paths it checks is tls_client_key, so a private key was loaded to
answer a question that does not need its contents. It now stats the
path, rejects anything that is not a regular file, and opens it without
reading. The message shape is unchanged:
"[telemetry] <key> cannot be read: <path> - <reason>".

A path naming a directory used to escape as an ios failure from the
stream buffer, naming neither the config key nor the path. It is now
rejected as "not a regular file" with both named. The new test covers
that case; it fails against the old implementation and against a copy
with the file-type branch removed.

The runbook's quick start and disable sections both told the reader to
run "cmake --preset default". No presets file is tracked, and the only
preset Conan generates is conan-release, so each of those steps failed
on its first command. Replaced with the flow BUILD.md documents, and
noted that telemetry is the current default while still passing the
flags.
2026-09-08 16:54:30 +01:00
Pratik Mankawde
30d165da43 fix(telemetry): bound integration-test assertions to the run under test
check_statsd_metric queried rippled_rpc_requests, which no pipeline
produces: the collector's statsd receiver runs with is_monotonic_counter,
so the Prometheus exporter appends _total. A wrong name returns zero
series rather than an error, so the assertion could not be told apart
from a broken pipeline. All eight assertions were re-derived from how
each metric is created in code; this was the only counter.

Tempo searches carried no start/end, and tempo-data is a named volume
that `docker compose down` preserves under a one-hour block retention, so
the 17 span assertions could pass on an earlier local run's traces. Bound
every search to this run, and tear the stack down with -v before starting
so no earlier data is present to match. The service-name check now
matches a whole line, because the tag-values endpoint ignores start/end.

Add a gtest for the StatsD gauge that publishes its initial zero and for
the counter that must publish nothing. Assert two metrics the harness
never checked: a traffic-category gauge no message reaches, and
io_context latency.
2026-09-08 16:43:41 +01:00
Pratik Mankawde
f1795813a2 Merge branch 'pratik/otel-phase4-consensus-tracing' into pratik/otel-phase5-docs-deployment 2026-09-08 16:03:05 +01:00
Pratik Mankawde
dc2a8f121e Merge branch 'pratik/otel-phase3-tx-tracing' into pratik/otel-phase4-consensus-tracing 2026-09-08 16:03:00 +01:00
Pratik Mankawde
0fd7ce9f8b Merge branch 'pratik/otel-phase2-rpc-tracing' into pratik/otel-phase3-tx-tracing 2026-09-08 16:02:54 +01:00
Pratik Mankawde
96c11264b0 Merge branch 'pratik/otel-phase1c-rpc-integration' into pratik/otel-phase2-rpc-tracing 2026-09-08 16:02:50 +01:00
Pratik Mankawde
31ace1a357 Merge branch 'pratik/otel-phase1b-telemetry-infra' into pratik/otel-phase1c-rpc-integration 2026-09-08 16:02:42 +01:00
Pratik Mankawde
9e72c1a8bf Merge branch 'pratik/otel-phase1a-plan-docs' into pratik/otel-phase1b-telemetry-infra 2026-09-08 16:02:36 +01:00
Pratik Mankawde
9c6d8deff5 Merge remote-tracking branch 'origin/develop' into pratik/otel-phase1a-plan-docs 2026-09-08 16:02:28 +01:00
Pratik Mankawde
d73e6f4020 merge: bring the review fixes forward from otel-phase9-metric-gap-fill 2026-09-08 15:53:57 +01:00
Pratik Mankawde
5542170422 docs(telemetry): drop the stale consensus_trace_strategy validation gap
The parser now maps the value onto ConsensusTraceStrategy and rejects any
other spelling, so the runbook note and the Phase 4 task-list bullet both
claimed a gap that no longer exists.
2026-09-08 15:52:58 +01:00
Pratik Mankawde
2fdfbe1b91 merge: bring the review fixes forward from otel-phase8-log-correlation 2026-09-08 15:51:07 +01:00
Pratik Mankawde
547cc8bac5 merge: bring the review fixes forward from otel-phase7-native-metrics 2026-09-08 15:46:05 +01:00
Pratik Mankawde
7d679ce596 merge: bring the review fixes forward from otel-phase6-statsd 2026-09-08 15:45:22 +01:00
Pratik Mankawde
9977810c6d merge: bring the review fixes forward from phase5-docs-deployment
One conflict, in docs/telemetry-runbook.md: both sides had independently
corrected the same consensus_round_id example. This branch kept the pipe form,
which Tempo rejects as a parse error; upstream moved the predicate inside the
braces, which parses and returns data. Upstream's query is kept, with this
branch's note that the value is the previous ledger sequence plus one.
2026-09-08 15:33:02 +01:00
Pratik Mankawde
868edce7e5 merge: bring the review fixes forward from phase4-consensus-tracing
Two conflicts, both additive.

TelemetryConfig.cpp: this branch added requireHttpsEndpoint next to
requireReadableFile; upstream added readConsensusTraceStrategy at the same spot.
Both kept.

05-configuration-reference.md: this branch added the two client-certificate rows
while upstream corrected the consensus strategy value from attribute to random.
Both kept. Also drops the stale "not yet implemented" row for
consensus_trace_strategy, which the merged table now contradicts twice over: the
option is parsed, and its value is no longer spelled attribute.
2026-09-08 15:31:40 +01:00
Pratik Mankawde
0c1babf9fb merge: bring the review fixes forward from otel-phase3-tx-tracing 2026-09-08 15:28:59 +01:00
Pratik Mankawde
7b302f5e77 merge: bring the review fixes forward from otel-phase2-rpc-tracing 2026-09-08 15:28:59 +01:00
Pratik Mankawde
a6dc9edf08 merge: bring the review fixes forward from otel-phase1c-rpc-integration 2026-09-08 15:28:59 +01:00
Pratik Mankawde
e417a4d434 merge: bring the review fixes forward from otel-phase1b-telemetry-infra 2026-09-08 15:28:59 +01:00
Pratik Mankawde
566af67bb8 merge: bring the review fixes forward from otel-phase1a-plan-docs 2026-09-08 15:28:59 +01:00
Pratik Mankawde
2399f5763f docs(telemetry): name the consensus trace strategy value "random"
The plan doc offered `"attribute"` as the alternative to `"deterministic"`
for consensus_trace_strategy. The parser accepts `"random"`; "attribute"
described the correlation mechanism rather than the setting's value. Note
also that the alternative is experimental and not used.
2026-09-08 14:42:32 +01:00