You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Spans. The workspace has 60 production tokio::spawn/spawn_blocking sites and exactly 2 .instrument(...) calls (zero Span::current()/in_current_span). Every uninstrumented spawn drops the span context — which is also the mechanism behind #588's topic="" problem, since log-topic labels are span fields: spans and topics are the same fix. #[tracing::instrument] appears 33 times, 22 of them in one file (validatorapi/component.rs); scheduler, fetcher, bcast, tracker, dutydb, parsigdb, aggsigdb, consensus/qbft, dkg, parsigex, and priority have none. Highest-value uninstrumented spawns: the scheduler's per-slot detached duty callbacks (scheduler.rs#L173-L184), the actor loops (tracker, aggsigdb, prioritiser), and the duty-workflow wiring in wire.rs.
Defined-but-never-recorded metrics (grep-verified, zero recording sites):
p2p_peer_network_{sent,receive}_bytes_total — the BandwidthFactory mechanism exists but only the relay server wires it; Node::new (client path) has no bandwidth parameter (behaviour.rs#L98).
p2p_peer_streams, p2p_relay_connections — declared in p2p/src/metrics.rs, recorded nowhere (Charon populates both in p2p.go).
core_validatorapi_proxy_request_latency_seconds — the RAII recorder exists, no construction site.
Otherwise name-for-name parity with Charon's metric families is good; app_eth2_* request/error/latency coverage is opt-in per call site (~11 of 76 endpoints) and moves into the client wrapper.
Add #[tracing::instrument] to the duty-pipeline entry points (fetch/propose/participate/broadcast/store paths), with skips to keep fields bounded.
Wire the four dead metric families above (or delete any that are deliberately out of scope, with a note).
While in layers/metrics.rs, cover the topic-resolution layer with tests: the TopicVisitor::record_debug fallback and nearest-enclosing-span resolution are untested (only same-span level filtering is).
Summary
Spans. The workspace has 60 production
tokio::spawn/spawn_blockingsites and exactly 2.instrument(...)calls (zeroSpan::current()/in_current_span). Every uninstrumented spawn drops the span context — which is also the mechanism behind #588'stopic=""problem, since log-topic labels are span fields: spans and topics are the same fix.#[tracing::instrument]appears 33 times, 22 of them in one file (validatorapi/component.rs); scheduler, fetcher, bcast, tracker, dutydb, parsigdb, aggsigdb, consensus/qbft, dkg, parsigex, and priority have none. Highest-value uninstrumented spawns: the scheduler's per-slot detached duty callbacks (scheduler.rs#L173-L184), the actor loops (tracker, aggsigdb, prioritiser), and the duty-workflow wiring inwire.rs.Defined-but-never-recorded metrics (grep-verified, zero recording sites):
app_eth2_using_fallback— missing entirely, yet the health check that queries it already exists and can never fire. Lands with the eth2api multi-client(replace theoas3-gengeneratedeth2client with a tailor-made one #611).p2p_peer_network_{sent,receive}_bytes_total— theBandwidthFactorymechanism exists but only the relay server wires it;Node::new(client path) has no bandwidth parameter (behaviour.rs#L98).p2p_peer_streams,p2p_relay_connections— declared inp2p/src/metrics.rs, recorded nowhere (Charon populates both inp2p.go).core_validatorapi_proxy_request_latency_seconds— the RAII recorder exists, no construction site.Otherwise name-for-name parity with Charon's metric families is good;
app_eth2_*request/error/latency coverage is opt-in per call site (~11 of 76 endpoints) and moves into the client wrapper.Proposed change
Span::current()(the Log topics:app_log_{warn,error}_totalis unlabelled across almost all of pluto #588 suggestion) and adopt it at the production spawn sites; set one root span per long-running component.#[tracing::instrument]to the duty-pipeline entry points (fetch/propose/participate/broadcast/store paths), withskips to keep fields bounded.layers/metrics.rs, cover the topic-resolution layer with tests: theTopicVisitor::record_debugfallback and nearest-enclosing-span resolution are untested (only same-span level filtering is).