NethermindEth / NethermindEth/pluto
Log topics: `app_log_{warn,error}_total` is unlabelled across almost all of pluto
@varex83 is already working on this.
Since Aug 25, 2026.
- Dominant language
- Rust
- Stars
- 8
- Forks
- 5
- Avg merge
- 4d 16h
- Merged PRs (30d)
- 37
Description
What is missing
MetricsLayer labels app_log_warn_total / app_log_error_total with a topic taken from the nearest enclosing span, falling back to an empty string: event_topic.
Pluto sets that span field in exactly two places — health/checker.rs#L60 and stacksnipe.rs#L100. Everything else, including all of crates/core, is counted under topic="".
Charon derives the same label from a context.Context value (WithTopic, metricsTopicFromCtx) and sets ~20 topics covering every component, with app-start as a catch-all over app.Run and the lifecycle hooks. Its unlabelled bucket is effectively empty.
Effects
- A warn/error rate spike carries no signal about which component produced it, since 209 of pluto's 211
warn!/error!sites share one label value. - PromQL that selects or excludes topics behaves differently against pluto and charon. Alert rules and Grafana panels written against charon's labels do not transfer.
Suggested fix
Span context does not cross tokio::spawn. Measured against MetricsLayer: a warn from a bare spawn inside a topic span lands on topic="", while the same future wrapped in .instrument(Span::current()) keeps the label. Hand-instrumenting each of the ~130 spawn sites is the wrong shape.
- Add a spawn helper that attaches
Span::current()to the future, restoring context-like propagation once. Components then inherit their topic by default instead of silently losing it. - Set
topicon one root span per long-running component (~20), reusing charon's names:tracker,vmock,sched,vapi,qbft,bcast,sigagg,parsigex,p2p,peerinfo,dkg,relay.
Keep topic values &'static str so the label stays bounded.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.