fix(telemetry): sync the Alloy spanmetrics dimensions with the collectors

Alloy declared 24 spanmetrics dimensions where both collector configs
declare 28. The four missing ones -- timed_out, object_type,
validation_status and accept_gated -- are emitted by the code and queried
by ledger-sync-health panels "Ledger Serve Rate by Object Type" and
"Trusted Validation Accept Rate by Status", so on an Alloy deployment
those panels collapsed to one undifferentiated series.

deploy-run-otel-xrpld.md already requires the dimension sets to stay in
sync; the config had drifted from it. Alloy's other differences from the
collectors (no filelog, no tail_sampling) are deliberate -- it is
cloud-only by design.
This commit is contained in:
Pratik Mankawde
2026-07-28 22:06:42 +01:00
parent 2f31a749a3
commit 862051c33d

View File

@@ -234,6 +234,18 @@ otelcol.connector.spanmetrics "xrpld" {
dimension { name = "outcome" }
dimension { name = "acquire_reason" }
// Sync-diagnostic span dimensions. `timed_out` separates "slow but arriving"
// from "the retry budget ran out" on the acquire phase spans; `object_type`
// splits ledger.serve by what was asked for. Both are small closed sets.
dimension { name = "timed_out" }
dimension { name = "object_type" }
// Trace-causality dimensions on consensus.validation.accept. The ledger_hash
// join key stays span-only -- one metric series per ledger would be unbounded
// -- and is indexed in Tempo instead.
dimension { name = "validation_status" }
dimension { name = "accept_gated" }
output {
// Derived span metrics rejoin the metric stream at the batch processor.
metrics = [otelcol.processor.batch.xrpld.input]