diff options
Diffstat (limited to 'crates/turtle/src/atuin_server/metrics.rs')
| -rw-r--r-- | crates/turtle/src/atuin_server/metrics.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/turtle/src/atuin_server/metrics.rs b/crates/turtle/src/atuin_server/metrics.rs index ebd0dd2d..7a9dc571 100644 --- a/crates/turtle/src/atuin_server/metrics.rs +++ b/crates/turtle/src/atuin_server/metrics.rs @@ -7,7 +7,7 @@ use axum::{ }; use metrics_exporter_prometheus::{Matcher, PrometheusBuilder, PrometheusHandle}; -pub fn setup_metrics_recorder() -> PrometheusHandle { +pub(crate) fn setup_metrics_recorder() -> PrometheusHandle { 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, ]; @@ -25,7 +25,7 @@ pub fn setup_metrics_recorder() -> PrometheusHandle { /// Middleware to record some common HTTP metrics /// Generic over B to allow for arbitrary body types (eg Vec<u8>, Streams, a deserialized thing, etc) /// Someday tower-http might provide a metrics middleware: https://github.com/tower-rs/tower-http/issues/57 -pub async fn track_metrics(req: Request, next: Next) -> impl IntoResponse { +pub(crate) async fn track_metrics(req: Request, next: Next) -> impl IntoResponse { let start = Instant::now(); let path = match req.extensions().get::<MatchedPath>() { |
