Skip to content

Commit 291d193

Browse files
author
tongjian
committed
cargo
Signed-off-by: tongjian <jian.tong@bytedance.com>
1 parent 2de40d2 commit 291d193

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ prost = { version = "0.11", optional = true }
2727
bytes = { version = "1.0", optional = true }
2828
log = "0.4"
2929
parking_lot = "0.12"
30-
prometheus = { version = "0.13", default-features = false }
30+
prometheus = { version = "0.13", default-features = false, optional=true}
3131
lazy_static = "1"
3232

3333
[workspace]
@@ -46,7 +46,7 @@ exclude = ["xtask"]
4646
[features]
4747
default = ["protobuf-codec", "boringssl","prometheus"]
4848
_secure = []
49-
prometheus = []
49+
prometheus = ["dep:prometheus"]
5050
protobuf-codec = ["protobuf"]
5151
protobufv3-codec = ["protobufv3"]
5252
prost-codec = ["prost", "bytes"]

src/env.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ use {
1717
},
1818
crate::task::resolve,
1919
prometheus::{
20-
core::{AtomicU64, GenericCounter},
20+
core::{AtomicU64, Counter},
2121
Histogram,
2222
},
2323
std::time::Instant,
@@ -28,7 +28,7 @@ pub struct GRPCRunner {
2828
cq_next_duration_his: Histogram,
2929
execute_duration_his: Histogram,
3030
wait_duration_his: Histogram,
31-
event_counter: [GenericCounter<AtomicU64>; 6],
31+
event_counter: [Counter<AtomicU64>; 6],
3232
}
3333

3434
#[cfg(feature = "prometheus")]

0 commit comments

Comments
 (0)