make rustls and optional feature in both places, organize deps

This commit is contained in:
Chris Beck
2025-12-04 23:59:57 -07:00
parent d4bf12e4ec
commit 028af2b7fb
6 changed files with 289 additions and 14 deletions
+1 -1
View File
@@ -9,6 +9,7 @@ workspace = true
[features]
default = ["plot"]
plot = ["prometheus-http-client/plot", "dep:chrono-tz", "dep:rand", "dep:walkdir"]
rustls-tls = ["prometheus-http-client/rustls-tls"]
[dependencies]
prometheus-http-client = { workspace = true, default-features = false }
@@ -24,7 +25,6 @@ humantime = { workspace = true }
hyper = { workspace = true }
hyper-util = { workspace = true }
jsonrpsee = { workspace = true }
reqwest = { workspace = true }
serde = { workspace = true }
serde_json = { workspace = true }
syslog_rfc5424 = { workspace = true }
+3 -1
View File
@@ -10,7 +10,9 @@ pub fn init_logging() {
.with_writer(std::io::stderr)
.with_file(true)
.with_line_number(true)
.with_env_filter(EnvFilter::try_from_default_env().unwrap_or_else(|_| EnvFilter::new("info")))
.with_env_filter(
EnvFilter::try_from_default_env().unwrap_or_else(|_| EnvFilter::new("info")),
)
.init();
// load dotenv file
+1 -2
View File
@@ -1,9 +1,8 @@
use conf::Conf;
use prometheus_http_client::{
AlertInfo, AlertsRequest, ExtractLabels, Labels, LabelsRequest, MetricVal, MetricValue,
PromRequest, QueryRequest, SeriesRequest,
PromRequest, QueryRequest, ReqwestClient, SeriesRequest,
};
use reqwest::Client as ReqwestClient;
use std::error::Error;
use tracing::info;