mirror of
https://github.com/XRPLF/rippled.git
synced 2026-04-29 15:37:57 +00:00
fix(telemetry): add missing counters, fix dashboard metric name, clean dead code
- Add rippled_validation_agreements_total and rippled_validation_missed_total
counter declarations and creation (wiring to ValidationTracker pending rebase)
- Fix peer-quality dashboard: query rippled_server_info{metric="peer_disconnects_resources"}
instead of non-existent rippled_Overlay_Peer_Disconnects_Charges
- Remove dead getCountsJson() call in storageDetail callback
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -250,7 +250,7 @@
|
||||
"datasource": {
|
||||
"type": "prometheus"
|
||||
},
|
||||
"expr": "rippled_Overlay_Peer_Disconnects_Charges{exported_instance=~\"$node\"}",
|
||||
"expr": "rippled_server_info{metric=\"peer_disconnects_resources\",exported_instance=~\"$node\"}",
|
||||
"legendFormat": "Disconnects [{{exported_instance}}]"
|
||||
}
|
||||
],
|
||||
|
||||
@@ -148,6 +148,10 @@ MetricsRegistry::start(std::string const& endpoint, std::string const& instanceI
|
||||
meter_->CreateUInt64Counter("rippled_state_changes_total", "Total operating mode changes");
|
||||
jqTransOverflowCounter_ = meter_->CreateUInt64Counter(
|
||||
"rippled_jq_trans_overflow_total", "Total job queue transaction overflows");
|
||||
validationAgreementsCounter_ = meter_->CreateUInt64Counter(
|
||||
"rippled_validation_agreements_total", "Total validation agreements");
|
||||
validationMissedCounter_ =
|
||||
meter_->CreateUInt64Counter("rippled_validation_missed_total", "Total validation misses");
|
||||
|
||||
// Register all observable (async) gauges.
|
||||
registerAsyncGauges();
|
||||
@@ -951,10 +955,6 @@ MetricsRegistry::registerAsyncGauges()
|
||||
|
||||
try
|
||||
{
|
||||
// Use getCountsJson which includes backend-reported sizes.
|
||||
Json::Value obj(Json::objectValue);
|
||||
app.getNodeStore().getCountsJson(obj);
|
||||
|
||||
auto observe = [&](char const* name, int64_t value) {
|
||||
opentelemetry::nostd::get<opentelemetry::nostd::shared_ptr<
|
||||
opentelemetry::metrics::ObserverResultT<int64_t>>>(result)
|
||||
|
||||
@@ -372,6 +372,13 @@ private:
|
||||
/// Counter: rippled_jq_trans_overflow_total — incremented on job queue transaction overflows.
|
||||
opentelemetry::nostd::unique_ptr<opentelemetry::metrics::Counter<uint64_t>>
|
||||
jqTransOverflowCounter_;
|
||||
/// Counter: rippled_validation_agreements_total — incremented by ValidationTracker on
|
||||
/// agreement.
|
||||
opentelemetry::nostd::unique_ptr<opentelemetry::metrics::Counter<uint64_t>>
|
||||
validationAgreementsCounter_;
|
||||
/// Counter: rippled_validation_missed_total — incremented by ValidationTracker on miss.
|
||||
opentelemetry::nostd::unique_ptr<opentelemetry::metrics::Counter<uint64_t>>
|
||||
validationMissedCounter_;
|
||||
|
||||
/** Register all observable gauge callbacks with the OTel SDK.
|
||||
Called once during start().
|
||||
|
||||
Reference in New Issue
Block a user