From d2eccf84e1892ee4b315270b5997e6b46c1a10ae Mon Sep 17 00:00:00 2001 From: Alex Snaps Date: Thu, 21 Dec 2023 17:41:26 -0500 Subject: [PATCH] Fix rest api instrumentation order --- limitador-server/src/http_api/server.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/limitador-server/src/http_api/server.rs b/limitador-server/src/http_api/server.rs index 3509b5d4..a0202ca9 100644 --- a/limitador-server/src/http_api/server.rs +++ b/limitador-server/src/http_api/server.rs @@ -44,8 +44,8 @@ async fn status() -> web::Json<()> { Json(()) } -#[api_v2_operation] #[tracing::instrument(skip(data))] +#[api_v2_operation] async fn metrics(data: web::Data>) -> String { match data.get_ref().as_ref() { Limiter::Blocking(limiter) => limiter.gather_prometheus_metrics(), @@ -68,8 +68,8 @@ async fn get_limits( Ok(Json(resp_limits)) } -#[api_v2_operation] #[tracing::instrument(skip(data))] +#[api_v2_operation] async fn get_counters( data: web::Data>, namespace: web::Path, @@ -92,8 +92,8 @@ async fn get_counters( } } -#[api_v2_operation] #[tracing::instrument(skip(state))] +#[api_v2_operation] async fn check( state: web::Data>, request: web::Json, @@ -121,8 +121,8 @@ async fn check( } } -#[api_v2_operation] #[tracing::instrument(skip(data))] +#[api_v2_operation] async fn report( data: web::Data>, request: web::Json, @@ -144,8 +144,8 @@ async fn report( } } -#[api_v2_operation] #[tracing::instrument(skip(data))] +#[api_v2_operation] async fn check_and_report( data: web::Data>, request: web::Json,