libp2p / libp2p/rust-libp2p

feat(metrics): Extend `IncomingConnectionError::TransportErrorOther`

Open
#3,680 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
5.6k
Forks
1.3k
Avg merge
8h 47m
Merged PRs (30d)
19

Description

Description

Is there an elegant way to expose more information than IncomingConnectionError::TransportErrorOther on transport specific errors without depending on concrete types?

We could use std::any::type_name.

Motivation

It would be good to know why in particular incoming connections on the Kademlia Exporter fail. See e.g. Incoming error per second graph.

https://github.com/libp2p/rust-libp2p/blob/1a85e24ef94eba2a79104d13e89b0891bf5997d4/misc/metrics/src/swarm.rs#L361-L370

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with misc/metrics/src/swarm.rs around lines 361-370 and trace how IncomingConnectionError::TransportErrorOther is produced and reported. Review the surrounding transport error types and existing tests or metrics conventions before proposing an API. Done means a decided, reviewed way to expose useful transport-specific context without depending on concrete types.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
networking, observability
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.