mirror of
https://github.com/XRPLF/rippled.git
synced 2026-09-27 15:28:03 +00:00
merge: bring the review fixes forward from otel-phase8-log-correlation
This commit is contained in:
@@ -318,7 +318,7 @@ Establish-phase gap fill and cross-node correlation attributes (Phase 4a):
|
||||
| --------------------- | ------ | --------------------------------------------------------- |
|
||||
| `consensus_round_id` | int64 | Consensus round number |
|
||||
| `consensus_ledger_id` | string | `previousLedger.id()` — shared across nodes |
|
||||
| `trace_strategy` | string | `"deterministic"` or `"attribute"` |
|
||||
| `trace_strategy` | string | `"deterministic"` or `"random"` |
|
||||
| `converge_percent` | int64 | Convergence % (0-100+) |
|
||||
| `establish_count` | int64 | Number of establish iterations |
|
||||
| `disputes_count` | int64 | Active disputed transactions |
|
||||
@@ -644,7 +644,8 @@ The first 16 bytes are used as trace_id. See [Phase 4a implementation status](./
|
||||
and `createDeterministicContext()` in `RCLConsensus.cpp` for the implementation.
|
||||
|
||||
Switchable via `consensus_trace_strategy` config:
|
||||
`"deterministic"` (default) or `"attribute"` (random trace_id, correlation via attribute queries).
|
||||
`"deterministic"` (default) or `"random"` (random trace_id, correlation via attribute queries).
|
||||
`"random"` is experimental and not used: it would break cross-node trace correlation.
|
||||
|
||||
#### Why Not Random IDs with Propagation Only?
|
||||
|
||||
|
||||
@@ -66,33 +66,26 @@ The authoritative `[telemetry]` example lives in `cfg/xrpld-example.cfg`. Teleme
|
||||
|
||||
### 5.1.2 Configuration Options Summary
|
||||
|
||||
| Option | Type | Default | Description |
|
||||
| -------------------------- | ------ | ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `enabled` | 0 or 1 | `0` | Enable/disable telemetry |
|
||||
| `traces_endpoint` | string | `http://localhost:4318/v1/traces` | OTLP/HTTP collector endpoint for **traces** |
|
||||
| `metrics_endpoint` | string | `http://localhost:4318/v1/metrics` | OTLP/HTTP collector endpoint for the native metrics pipeline (`MetricsRegistry`). Read in `Application.cpp:1670` |
|
||||
| `use_tls` | 0 or 1 | `0` | Enable TLS for exporter connection |
|
||||
| `tls_ca_cert` | string | `""` | Path to CA certificate file |
|
||||
| `tls_client_cert` | string | `""` | Client cert (PEM) for mTLS; empty = one-way; if `enabled=1`, needs key + `use_tls=1` or startup fails |
|
||||
| `tls_client_key` | string | `""` | Private key (PEM) for `tls_client_cert`; if set with `enabled=1`, needs the cert + `use_tls=1` or fails |
|
||||
| `batch_size` | uint | `512` | Spans per export batch |
|
||||
| `batch_delay_ms` | uint | `5000` | Max delay before sending batch (ms) |
|
||||
| `max_queue_size` | uint | `2048` | Maximum queued spans |
|
||||
| `trace_transactions` | 0 or 1 | `1` | Enable transaction tracing |
|
||||
| `trace_consensus` | 0 or 1 | `1` | Enable consensus tracing |
|
||||
| `trace_rpc` | 0 or 1 | `1` | Enable RPC tracing |
|
||||
| `trace_peer` | 0 or 1 | `1` | Enable peer message tracing (high volume) |
|
||||
| `trace_ledger` | 0 or 1 | `1` | Enable ledger tracing |
|
||||
| `consensus_trace_strategy` | string | `"deterministic"` | Consensus trace ID strategy: `"deterministic"` (trace_id = prevLedgerHash[0:16]) or `"attribute"` (random). Parsed at `TelemetryConfig.cpp:155-156`, consumed at `RCLConsensus.cpp:1291,1296`. **Not validated** — see the note below |
|
||||
| `service_name` | string | `"xrpld"` | Service name (`service.name`) for traces and metrics |
|
||||
| `service_instance_id` | string | node public key (base58) | Instance identifier (`service.instance.id`). Traces, span metrics and native `XRPL_METRIC_*` metrics all fall back to the node key; **`beast::insight` metrics do not** — see the note in §5.1.1 |
|
||||
|
||||
**`consensus_trace_strategy` is not validated.** `TelemetryConfig.cpp:155-156`
|
||||
copies the raw string into `Setup::consensusTraceStrategy` without checking it
|
||||
against an allowed set, 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 two accepted values are documented at `include/xrpl/telemetry/Telemetry.h:287-292`.
|
||||
| Option | Type | Default | Description |
|
||||
| -------------------------- | ------ | ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| `enabled` | 0 or 1 | `0` | Enable/disable telemetry |
|
||||
| `traces_endpoint` | string | `http://localhost:4318/v1/traces` | OTLP/HTTP collector endpoint for **traces** |
|
||||
| `metrics_endpoint` | string | `http://localhost:4318/v1/metrics` | OTLP/HTTP collector endpoint for the native metrics pipeline (`MetricsRegistry`). Read in `Application.cpp:1670` |
|
||||
| `use_tls` | 0 or 1 | `0` | Enable TLS for exporter connection |
|
||||
| `tls_ca_cert` | string | `""` | Path to CA certificate file |
|
||||
| `tls_client_cert` | string | `""` | Client cert (PEM) for mTLS; empty = one-way; if `enabled=1`, needs key + `use_tls=1` or startup fails |
|
||||
| `tls_client_key` | string | `""` | Private key (PEM) for `tls_client_cert`; if set with `enabled=1`, needs the cert + `use_tls=1` or fails |
|
||||
| `batch_size` | uint | `512` | Spans per export batch |
|
||||
| `batch_delay_ms` | uint | `5000` | Max delay before sending batch (ms) |
|
||||
| `max_queue_size` | uint | `2048` | Maximum queued spans |
|
||||
| `trace_transactions` | 0 or 1 | `1` | Enable transaction tracing |
|
||||
| `trace_consensus` | 0 or 1 | `1` | Enable consensus tracing |
|
||||
| `trace_rpc` | 0 or 1 | `1` | Enable RPC tracing |
|
||||
| `trace_peer` | 0 or 1 | `1` | Enable peer message tracing (high volume) |
|
||||
| `trace_ledger` | 0 or 1 | `1` | Enable ledger tracing |
|
||||
| `consensus_trace_strategy` | string | `"deterministic"` | Consensus trace ID strategy: `"deterministic"` (trace_id = prevLedgerHash[0:16]) or `"random"` (experimental, not used). Rejected at startup if it is neither spelling |
|
||||
| `service_name` | string | `"xrpld"` | Service name (`service.name`) for traces and metrics |
|
||||
| `service_instance_id` | string | node public key (base58) | Instance identifier (`service.instance.id`). Traces, span metrics and native `XRPL_METRIC_*` metrics all fall back to the node key; **`beast::insight` metrics do not** — see the note in §5.1.1 |
|
||||
|
||||
**Not a config key — deterministic transaction trace IDs are unconditional.**
|
||||
Earlier drafts of this document listed a `tx_trace_strategy` option
|
||||
|
||||
@@ -253,7 +253,8 @@ Phase 4a (establish-phase gap fill & cross-node correlation) adds:
|
||||
|
||||
- **Deterministic trace ID** derived from `previousLedger.id()` so all validators
|
||||
in the same round share the same `trace_id` (switchable via
|
||||
`consensus_trace_strategy` config: `"deterministic"` or `"attribute"`).
|
||||
`consensus_trace_strategy` config: `"deterministic"`, or `"random"` which is
|
||||
experimental and not used).
|
||||
See [Configuration Reference](./05-configuration-reference.md) for full
|
||||
configuration options.
|
||||
- **Round lifecycle spans**: `consensus.round` with round-to-round span links.
|
||||
|
||||
Reference in New Issue
Block a user