mirror of
https://github.com/romanz/electrs.git
synced 2024-11-19 01:43:29 +01:00
Don't use prometheus::process_collector::ProcessCollector by default
Following #491. It can be re-enabled by: ``` cargo build --release --features prometheus/process ```
This commit is contained in:
parent
a53048f2ef
commit
2ded459d0c
59
Cargo.lock
generated
59
Cargo.lock
generated
@ -1,11 +1,5 @@
|
||||
# This file is automatically @generated by Cargo.
|
||||
# It is not intended for manual editing.
|
||||
[[package]]
|
||||
name = "adler"
|
||||
version = "1.0.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe"
|
||||
|
||||
[[package]]
|
||||
name = "aho-corasick"
|
||||
version = "0.7.18"
|
||||
@ -249,15 +243,6 @@ dependencies = [
|
||||
"serde_json",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "crc32fast"
|
||||
version = "1.2.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "81156fece84ab6a9f2afdb109ce3ae577e42b1228441eded99bd77f627953b1a"
|
||||
dependencies = [
|
||||
"cfg-if 1.0.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "crossbeam-channel"
|
||||
version = "0.5.1"
|
||||
@ -389,18 +374,6 @@ dependencies = [
|
||||
"termcolor",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "flate2"
|
||||
version = "1.0.21"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "80edafed416a46fb378521624fab1cfa2eb514784fd8921adbe8a8d8321da811"
|
||||
dependencies = [
|
||||
"cfg-if 1.0.0",
|
||||
"crc32fast",
|
||||
"libc",
|
||||
"miniz_oxide",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "fmt2io"
|
||||
version = "0.1.0"
|
||||
@ -455,12 +428,6 @@ dependencies = [
|
||||
"libc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "hex"
|
||||
version = "0.4.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70"
|
||||
|
||||
[[package]]
|
||||
name = "humantime"
|
||||
version = "1.3.0"
|
||||
@ -593,16 +560,6 @@ dependencies = [
|
||||
"autocfg 1.0.1",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "miniz_oxide"
|
||||
version = "0.4.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a92518e98c078586bc6c934028adcca4c92a53d6a958196de835170a01d84e4b"
|
||||
dependencies = [
|
||||
"adler",
|
||||
"autocfg 1.0.1",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "nom"
|
||||
version = "5.1.2"
|
||||
@ -700,20 +657,6 @@ dependencies = [
|
||||
"unicode-xid",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "procfs"
|
||||
version = "0.9.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ab8809e0c18450a2db0f236d2a44ec0b4c1412d0eb936233579f0990faa5d5cd"
|
||||
dependencies = [
|
||||
"bitflags",
|
||||
"byteorder",
|
||||
"flate2",
|
||||
"hex",
|
||||
"lazy_static",
|
||||
"libc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "prometheus"
|
||||
version = "0.12.0"
|
||||
@ -723,10 +666,8 @@ dependencies = [
|
||||
"cfg-if 1.0.0",
|
||||
"fnv",
|
||||
"lazy_static",
|
||||
"libc",
|
||||
"memchr",
|
||||
"parking_lot",
|
||||
"procfs",
|
||||
"protobuf",
|
||||
"thiserror",
|
||||
]
|
||||
|
@ -28,7 +28,7 @@ dirs-next = "2.0"
|
||||
env_logger = "0.7"
|
||||
log = "0.4"
|
||||
parking_lot = "0.11"
|
||||
prometheus = { version = "0.12", features = ["process"], optional = true }
|
||||
prometheus = { version = "0.12", optional = true }
|
||||
rayon = "1.5"
|
||||
serde = "1.0"
|
||||
serde_derive = "1.0"
|
||||
|
@ -1,3 +1,7 @@
|
||||
# 0.9.0 (TBD)
|
||||
|
||||
* Don't collect process' Prometheus metrics by default (#492)
|
||||
|
||||
# 0.9.0-rc1 (Sep 17 2021)
|
||||
|
||||
**IMPORTANT: This release contains major changes, please read carefully!**
|
||||
|
@ -1,7 +1,10 @@
|
||||
#[cfg(feature = "metrics")]
|
||||
mod metrics_impl {
|
||||
use anyhow::{Context, Result};
|
||||
|
||||
#[cfg(feature = "prometheus/process")]
|
||||
use prometheus::process_collector::ProcessCollector;
|
||||
|
||||
use prometheus::{self, Encoder, HistogramOpts, HistogramVec, Registry};
|
||||
use tiny_http::{Response, Server};
|
||||
|
||||
@ -17,6 +20,7 @@ mod metrics_impl {
|
||||
pub fn new(addr: SocketAddr) -> Result<Self> {
|
||||
let reg = Registry::new();
|
||||
|
||||
#[cfg(feature = "prometheus/process")]
|
||||
reg.register(Box::new(ProcessCollector::for_self()))
|
||||
.expect("failed to register ProcessCollector");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user