diff --git a/OpenTelemetryPlan/Phase4_taskList.md b/OpenTelemetryPlan/Phase4_taskList.md index 57c9ad0725..f4cb0bb38c 100644 --- a/OpenTelemetryPlan/Phase4_taskList.md +++ b/OpenTelemetryPlan/Phase4_taskList.md @@ -943,12 +943,11 @@ and OFF, and don't affect consensus timing. - **No `getTelemetry()` adaptor method**: `SpanGuard::span()` is a static factory that internally checks telemetry state, so `Consensus.h` doesn't need adaptor access for span creation. Only `RCLConsensus::Adaptor` accesses `app_.getTelemetry()` directly. -- **No config validation**: `consensus_trace_strategy` is **not** validated. - `TelemetryConfig.cpp:155-156` copies the raw string through, and the only - comparison in the code is `strategy == "attribute"` (`RCLConsensus.cpp:1296`). - Any unrecognised value — including a typo — silently takes the deterministic - branch, with no log warning. The effective fallback is correct; the absence of - a diagnostic is a known gap. +- **Config validation**: `readConsensusTraceStrategy()` in `TelemetryConfig.cpp` + maps `consensus_trace_strategy` onto `ConsensusTraceStrategy`, accepting only + `deterministic` and `random`. Anything else, including a typo, makes the node + exit at startup with a message naming the key. `RCLConsensus::Adaptor` branches + on the enumerator, so no string comparison reaches the consensus path. - **Plan deviation**: `roundSpan_` is stored in `RCLConsensus::Adaptor` (not `Consensus.h`) because the adaptor has access to telemetry config and can implement the deterministic trace ID strategy. `establishSpan_` is correctly diff --git a/docs/telemetry-runbook.md b/docs/telemetry-runbook.md index 78252c036c..217b2eec50 100644 --- a/docs/telemetry-runbook.md +++ b/docs/telemetry-runbook.md @@ -154,13 +154,6 @@ curl -s http://localhost:5015 -d '{"method":"server_info"}' | > it is present even when `[telemetry] service_instance_id` is configured. > TraceQL filters on it as `resource.xrpl.node.id`. -> **`consensus_trace_strategy` is not validated.** The parser copies the raw -> string through (`TelemetryConfig.cpp:155-156`) and the only equality test in -> the code is `strategy == "attribute"` (`RCLConsensus.cpp:1296`). Any other -> value — including a typo such as `determinstic` — silently selects the -> deterministic branch. There is no warning in the log. The two accepted values -> are documented at `include/xrpl/telemetry/Telemetry.h:287-292`. - ## Exporting to Grafana Cloud The collector can ship traces, metrics, and logs to a hosted **Grafana