diff --git a/Cargo.toml b/Cargo.toml index f654186..59ffb47 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -27,8 +27,3 @@ rand = "0.8.5" rdkafka = { version = "0.34", features = ["cmake-build"] } metrics = "0.21.1" metrics-exporter-prometheus = "0.12.1" - -[dev-dependencies] -assert-json-diff = "2.0.2" -axum-test-helper = "0.2.0" -mockall = "0.11.2" diff --git a/capture-server/src/main.rs b/capture-server/src/main.rs index d96eb66..88ffc94 100644 --- a/capture-server/src/main.rs +++ b/capture-server/src/main.rs @@ -3,9 +3,6 @@ use std::net::SocketAddr; use capture::{router, sink, time}; -use crate::time::SystemTime; -use crate::{router, sink}; - #[tokio::main] async fn main() { let use_print_sink = env::var("PRINT_SINK").is_ok(); diff --git a/capture/src/lib.rs b/capture/src/lib.rs index 27208dd..d4ca041 100644 --- a/capture/src/lib.rs +++ b/capture/src/lib.rs @@ -1,17 +1,9 @@ pub mod api; pub mod capture; pub mod event; +pub mod prometheus; pub mod router; pub mod sink; pub mod time; -<<<<<<< HEAD:capture/src/lib.rs pub mod token; pub mod utils; -pub mod prometheus; -======= - -mod capture; -mod prometheus; -mod token; -mod utils; ->>>>>>> 791a20d (Run formatter):src/lib.rs diff --git a/capture/src/prometheus.rs b/capture/src/prometheus.rs index 66f86f5..1fcdb7d 100644 --- a/capture/src/prometheus.rs +++ b/capture/src/prometheus.rs @@ -6,8 +6,9 @@ use axum::{extract::MatchedPath, http::Request, middleware::Next, response::Into use metrics_exporter_prometheus::{Matcher, PrometheusBuilder, PrometheusHandle}; pub fn setup_metrics_recorder() -> PrometheusHandle { + // Ok I broke it at the end, but the limit on our ingress is 60 and that's a nicer way of reaching it const EXPONENTIAL_SECONDS: &[f64] = &[ - 0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1.0, 2.5, 5.0, 10.0, + 0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1.0, 2.5, 5.0, 10.0, 30.0, 60.0, ]; PrometheusBuilder::new()