Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Preserve tracing spans across spawns, instrument components, record missing metrics

Aperta
#631 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 4 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Stack tecnologico
rust

Direzione di ricerca

Inizia da crates/core/src/scheduler.rs, wire.rs, dai loop degli actor e layers/metrics.rs per mappare il comportamento di spawn e span; poi esamina crates/p2p/src/metrics.rs, crates/app/node/behaviour.rs e i controlli di health dell’app. Il lavoro è completo quando gli spawn di produzione preservano il contesto, le famiglie di metriche elencate sono collegate o rimosse esplicitamente e i test di risoluzione dei topic coprono i fallback indicati.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

enhancement rust

Summary

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):

  • 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(#611).
  • 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.

Proposed change

  1. Add a spawn helper attaching Span::current() (the #588 suggestion) and adopt it at the production spawn sites; set one root span per long-running component.
  2. Add #[tracing::instrument] to the duty-pipeline entry points (fetch/propose/participate/broadcast/store paths), with skips to keep fields bounded.
  3. Wire the four dead metric families above (or delete any that are deliberately out of scope, with a note).
  4. 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).
Lingua principale
Rust
Stelle
8
Fork
6
Merge medio
4g 3h
PR unite (30g)
18

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di NethermindEth/pluto

Tutte le issue di NethermindEth/pluto

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.