mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-06-13 01:51:23 +00:00
{misc,protocols/gossipsub}: Move to prometheus-client (#2442)
`open-metrics-client` has been accepted as the official Prometheus Rust client and thus renamed to `prometheus-client`. See https://groups.google.com/g/prometheus-developers/c/E67ByGmVQKM
This commit is contained in:
@ -1,3 +1,9 @@
|
||||
# 0.36.0 [unreleased]
|
||||
|
||||
- Move from `open-metrics-client` to `prometheus-client` (see [PR 2442]).
|
||||
|
||||
[PR 2442]: https://github.com/libp2p/rust-libp2p/pull/2442
|
||||
|
||||
# 0.35.0 [2022-01-27]
|
||||
|
||||
- Update dependencies.
|
||||
|
@ -3,7 +3,7 @@ name = "libp2p-gossipsub"
|
||||
edition = "2021"
|
||||
rust-version = "1.56.1"
|
||||
description = "Gossipsub protocol for libp2p"
|
||||
version = "0.35.0"
|
||||
version = "0.36.0"
|
||||
authors = ["Age Manning <Age@AgeManning.com>"]
|
||||
license = "MIT"
|
||||
repository = "https://github.com/libp2p/rust-libp2p"
|
||||
@ -32,7 +32,7 @@ pin-project = "1.0.8"
|
||||
instant = "0.1.11"
|
||||
serde = { version = "1", optional = true, features = ["derive"] }
|
||||
# Metrics dependencies
|
||||
open-metrics-client = "0.14.0"
|
||||
prometheus-client = "0.15.0"
|
||||
|
||||
[dev-dependencies]
|
||||
async-std = "1.6.3"
|
||||
|
@ -32,7 +32,7 @@ use std::{
|
||||
|
||||
use futures::StreamExt;
|
||||
use log::{debug, error, trace, warn};
|
||||
use open_metrics_client::registry::Registry;
|
||||
use prometheus_client::registry::Registry;
|
||||
use prost::Message;
|
||||
use rand::{seq::SliceRandom, thread_rng};
|
||||
|
||||
|
@ -23,12 +23,12 @@
|
||||
|
||||
use std::collections::HashMap;
|
||||
|
||||
use open_metrics_client::encoding::text::Encode;
|
||||
use open_metrics_client::metrics::counter::Counter;
|
||||
use open_metrics_client::metrics::family::{Family, MetricConstructor};
|
||||
use open_metrics_client::metrics::gauge::Gauge;
|
||||
use open_metrics_client::metrics::histogram::{linear_buckets, Histogram};
|
||||
use open_metrics_client::registry::Registry;
|
||||
use prometheus_client::encoding::text::Encode;
|
||||
use prometheus_client::metrics::counter::Counter;
|
||||
use prometheus_client::metrics::family::{Family, MetricConstructor};
|
||||
use prometheus_client::metrics::gauge::Gauge;
|
||||
use prometheus_client::metrics::histogram::{linear_buckets, Histogram};
|
||||
use prometheus_client::registry::Registry;
|
||||
|
||||
use crate::topic::TopicHash;
|
||||
use crate::types::{MessageAcceptance, PeerKind};
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
use crate::rpc_proto;
|
||||
use base64::encode;
|
||||
use open_metrics_client::encoding::text::Encode;
|
||||
use prometheus_client::encoding::text::Encode;
|
||||
use prost::Message;
|
||||
use sha2::{Digest, Sha256};
|
||||
use std::fmt;
|
||||
|
@ -22,7 +22,7 @@
|
||||
use crate::rpc_proto;
|
||||
use crate::TopicHash;
|
||||
use libp2p_core::{connection::ConnectionId, PeerId};
|
||||
use open_metrics_client::encoding::text::Encode;
|
||||
use prometheus_client::encoding::text::Encode;
|
||||
use prost::Message;
|
||||
use std::fmt;
|
||||
use std::fmt::Debug;
|
||||
|
Reference in New Issue
Block a user