From 2b546f9ccc5b2b4dbc63b6edce35497833594887 Mon Sep 17 00:00:00 2001 From: Xuanwo Date: Mon, 20 Nov 2023 19:57:35 +0800 Subject: [PATCH 1/2] refactor: Make prometheus deps optional Signed-off-by: Xuanwo --- Cargo.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 25cc42eb..1e2e14a5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,7 +9,7 @@ description = "The Rust language implementation of TiKV client." edition = "2021" [features] -default = ["prometheus/process"] +default = ["prometheus"] # Enable integration tests with a running TiKV and PD instance. # Use $PD_ADDRS, comma separated, to set the addresses the tests use. integration-tests = [] @@ -33,7 +33,7 @@ futures = { version = "0.3" } lazy_static = "1" log = "0.4" pin-project = "1" -prometheus = { version = "0.13", features = ["push"], default-features = false } +prometheus = { version = "0.13", features = ["push", "process"], optional = true, default-features = false } prost = "0.12" rand = "0.8" regex = "1" From 3bb784aabe38016ae3376fc4ce076417748aa7cd Mon Sep 17 00:00:00 2001 From: Xuanwo Date: Mon, 20 Nov 2023 20:08:55 +0800 Subject: [PATCH 2/2] Remove push and process Signed-off-by: Xuanwo --- Cargo.toml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 1e2e14a5..5e5970c9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,6 +10,7 @@ edition = "2021" [features] default = ["prometheus"] +prometheus = ["prometheus/push", "prometheus/process"] # Enable integration tests with a running TiKV and PD instance. # Use $PD_ADDRS, comma separated, to set the addresses the tests use. integration-tests = [] @@ -33,7 +34,7 @@ futures = { version = "0.3" } lazy_static = "1" log = "0.4" pin-project = "1" -prometheus = { version = "0.13", features = ["push", "process"], optional = true, default-features = false } +prometheus = { version = "0.13", default-features = false } prost = "0.12" rand = "0.8" regex = "1"