aboutsummaryrefslogtreecommitdiffstats
path: root/crates/atuin-server/src/metrics.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/atuin-server/src/metrics.rs')
-rw-r--r--crates/atuin-server/src/metrics.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/crates/atuin-server/src/metrics.rs b/crates/atuin-server/src/metrics.rs
index 0a7ac6bd..ff0fe925 100644
--- a/crates/atuin-server/src/metrics.rs
+++ b/crates/atuin-server/src/metrics.rs
@@ -28,10 +28,9 @@ pub fn setup_metrics_recorder() -> PrometheusHandle {
pub async fn track_metrics(req: Request, next: Next) -> impl IntoResponse {
let start = Instant::now();
- let path = if let Some(matched_path) = req.extensions().get::<MatchedPath>() {
- matched_path.as_str().to_owned()
- } else {
- req.uri().path().to_owned()
+ let path = match req.extensions().get::<MatchedPath>() {
+ Some(matched_path) => matched_path.as_str().to_owned(),
+ _ => req.uri().path().to_owned(),
};
let method = req.method().clone();