Skip to content
This repository has been archived by the owner on Feb 8, 2024. It is now read-only.

Commit

Permalink
Fixes and feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
Ellie Huxtable committed Sep 14, 2023
1 parent 768db2a commit dec9fd8
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 18 deletions.
5 changes: 0 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
3 changes: 0 additions & 3 deletions capture-server/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
10 changes: 1 addition & 9 deletions capture/src/lib.rs
Original file line number Diff line number Diff line change
@@ -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
3 changes: 2 additions & 1 deletion capture/src/prometheus.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit dec9fd8

Please sign in to comment.