diff --git a/Cargo.lock b/Cargo.lock index 8a7b06c..f9428cf 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1324,7 +1324,7 @@ dependencies = [ ] [[package]] -name = "prom-client" +name = "prometheus-http-client" version = "0.1.0" dependencies = [ "async-trait", @@ -1686,7 +1686,7 @@ dependencies = [ "hyper", "hyper-util", "jsonrpsee", - "prom-client", + "prometheus-http-client", "rand", "reqwest", "rustls", diff --git a/Cargo.toml b/Cargo.toml index 39b29e0..a4a4bc7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [workspace] resolver = "2" members = [ - "prom-client", + "prometheus-http-client", "signal-gateway", ] @@ -21,7 +21,7 @@ assigning_clones = "allow" result_large_err = "allow" [workspace.dependencies] -prom-client = { path = "prom-client" } +prometheus-http-client = { path = "prometheus-http-client" } async-trait = "0.1" chrono = { version = "0.4", default-features = false, features = ["clock", "serde", "std"] } diff --git a/prom-client/Cargo.toml b/prometheus-http-client/Cargo.toml similarity index 94% rename from prom-client/Cargo.toml rename to prometheus-http-client/Cargo.toml index f50ba00..87587bc 100644 --- a/prom-client/Cargo.toml +++ b/prometheus-http-client/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "prom-client" +name = "prometheus-http-client" version = "0.1.0" edition.workspace = true diff --git a/prom-client/src/builders.rs b/prometheus-http-client/src/builders.rs similarity index 100% rename from prom-client/src/builders.rs rename to prometheus-http-client/src/builders.rs diff --git a/prom-client/src/error.rs b/prometheus-http-client/src/error.rs similarity index 100% rename from prom-client/src/error.rs rename to prometheus-http-client/src/error.rs diff --git a/prom-client/src/labels.rs b/prometheus-http-client/src/labels.rs similarity index 100% rename from prom-client/src/labels.rs rename to prometheus-http-client/src/labels.rs diff --git a/prom-client/src/lib.rs b/prometheus-http-client/src/lib.rs similarity index 100% rename from prom-client/src/lib.rs rename to prometheus-http-client/src/lib.rs diff --git a/prom-client/src/messages.rs b/prometheus-http-client/src/messages.rs similarity index 100% rename from prom-client/src/messages.rs rename to prometheus-http-client/src/messages.rs diff --git a/prom-client/src/plot.rs b/prometheus-http-client/src/plot.rs similarity index 100% rename from prom-client/src/plot.rs rename to prometheus-http-client/src/plot.rs diff --git a/prom-client/src/traits.rs b/prometheus-http-client/src/traits.rs similarity index 100% rename from prom-client/src/traits.rs rename to prometheus-http-client/src/traits.rs diff --git a/signal-gateway/Cargo.toml b/signal-gateway/Cargo.toml index 31a721b..5032fc2 100644 --- a/signal-gateway/Cargo.toml +++ b/signal-gateway/Cargo.toml @@ -7,7 +7,7 @@ edition.workspace = true workspace = true [dependencies] -prom-client = { workspace = true } +prometheus-http-client = { workspace = true } chrono = { workspace = true } conf = { workspace = true } diff --git a/signal-gateway/src/gateway/mod.rs b/signal-gateway/src/gateway/mod.rs index 18565b6..baf6894 100644 --- a/signal-gateway/src/gateway/mod.rs +++ b/signal-gateway/src/gateway/mod.rs @@ -7,7 +7,7 @@ use conf::{Conf, Subcommands}; use futures_util::FutureExt; use http_body_util::BodyExt; use hyper::{Method, Request, Response, StatusCode, body::Incoming}; -use prom_client::{AlertStatus, ExtractLabels}; +use prometheus_http_client::{AlertStatus, ExtractLabels}; //use jsonrpsee::async_client::{Client as JsonRpcClient, Error as JsonRpcError}; use chrono::Utc; use std::{collections::HashMap, error::Error, fmt::Write, net::SocketAddr, time::Duration}; diff --git a/signal-gateway/src/plotter.rs b/signal-gateway/src/plotter.rs index 246f65c..2a83388 100644 --- a/signal-gateway/src/plotter.rs +++ b/signal-gateway/src/plotter.rs @@ -1,14 +1,13 @@ use crate::http::Alert; use chrono::Utc; use conf::Conf; -use prom_client::{ - AlertInfo, AlertsRequest, ExtractLabels, Labels, LabelsRequest, MetricTimeseries, MetricValue, - PromRequest, QueryRangeRequest, QueryRequest, SeriesRequest, +use prometheus_http_client::{ + AlertInfo, AlertsRequest, ExtractLabels, Labels, LabelsRequest, MetricTimeseries, MetricVal, + MetricValue, PromRequest, QueryRangeRequest, QueryRequest, SeriesRequest, plot::{PlotStyle, PlotThreshold}, }; use rand::RngCore; use reqwest::Client as ReqwestClient; -use prom_client::MetricVal; use std::{error::Error, str::FromStr, time::Duration}; use tracing::{info, warn}; use walkdir::WalkDir;