Update to latest discovery (#6486)

* Upgrade discv5 to v0.8

* Rename some logs

* Improve the NAT reporting with new discv5 metrics

* Merge branch 'unstable' into discv5-v8

* Limited Cargo.lock update

* Update yanked futures-* crates
This commit is contained in:
Age Manning
2024-11-19 09:52:23 +11:00
committed by GitHub
parent c5007eaa1c
commit 8cebc87d95
8 changed files with 133 additions and 73 deletions

View File

@@ -8,6 +8,7 @@ pub static NAT_OPEN: LazyLock<Result<IntGaugeVec>> = LazyLock::new(|| {
&["protocol"],
)
});
pub static ADDRESS_UPDATE_COUNT: LazyLock<Result<IntCounter>> = LazyLock::new(|| {
try_create_int_counter(
"libp2p_address_update_total",
@@ -212,4 +213,6 @@ pub fn scrape_discovery_metrics() {
set_gauge(&DISCOVERY_SESSIONS, metrics.active_sessions as i64);
set_gauge_vec(&DISCOVERY_BYTES, &["inbound"], metrics.bytes_recv as i64);
set_gauge_vec(&DISCOVERY_BYTES, &["outbound"], metrics.bytes_sent as i64);
set_gauge_vec(&NAT_OPEN, &["discv5_ipv4"], metrics.ipv4_contactable as i64);
set_gauge_vec(&NAT_OPEN, &["discv5_ipv6"], metrics.ipv6_contactable as i64);
}