mirror of
https://github.com/leptos-rs/leptos
synced 2024-11-10 06:44:17 +00:00
feat(leptos-axum): propagate trace context to server functions (#2340)
This commit is contained in:
parent
747aba0d7f
commit
0a73487152
1 changed files with 6 additions and 0 deletions
|
@ -257,7 +257,13 @@ async fn handle_server_fns_inner(
|
|||
|
||||
let (tx, rx) = futures::channel::oneshot::channel();
|
||||
|
||||
// capture current span to enable trace context propagation
|
||||
let current_span = tracing::Span::current();
|
||||
|
||||
spawn_task!(async move {
|
||||
// enter captured span for trace context propagation in spawned task
|
||||
let _guard = current_span.enter();
|
||||
|
||||
let path = req.uri().path().to_string();
|
||||
let (req, parts) = generate_request_and_parts(req);
|
||||
|
||||
|
|
Loading…
Reference in a new issue