mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-11-14 04:37:00 +00:00
Add unique id counter to request tracing span. (fixes #112)
Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
1 parent
ed0b3c764e
commit
cbe34affa3
2 files changed
+17
-4
No files matched your search
+12
-1
@@ -15,7 +15,18 @@ use tracing::Span;
|
||||
use tuwunel_core::{Result, debug, debug_error, debug_warn, err, error, trace};
|
||||
use tuwunel_service::Services;
|
||||
|
||||
#[tracing::instrument(name = "request", level = "debug", skip_all)]
|
||||
#[tracing::instrument(
|
||||
name = "request",
|
||||
level = "debug",
|
||||
skip_all,
|
||||
fields(
|
||||
id = %services
|
||||
.server
|
||||
.metrics
|
||||
.requests_count
|
||||
.fetch_add(1, Ordering::Relaxed)
|
||||
)
|
||||
)]
|
||||
pub(crate) async fn handle(
|
||||
State(services): State<Arc<Services>>,
|
||||
req: http::Request<axum::body::Body>,
|
||||
|
||||
Reference in new issue
Block a user