Skip to content

misc/metrics: Expose bytes send/received per protocol #3262

@mxinden

Description

@mxinden

Description

Expose Prometheus metrics counting the number of bytes send and received on streams per protocol.

Rough idea:

libp2p_bytes { direction = "in", protocol = "/ipfs/kad/1.0.0" } 42
libp2p_bytes { direction = "out", protocol = "/ipfs/kad/1.0.0" } 42

Motivation

Allows us to get an intuition of the bandwidth consumption of each of the libp2p protocols.

Requirements

  1. Use fix(libp2p): Don't specify monorepo dev dependencies by version #3261
  2. Implement Collector trait from src/collector: Introduce Collector abstraction prometheus/client_rust#82

Open questions

Are you planning to do it yourself in a pull request?

Not any time soon. Help is much appreciated.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions