mirror of
https://github.com/leptos-rs/leptos
synced 2024-11-10 14:54:16 +00:00
Persist parent span context within resource fetchers (#2456)
This commit is contained in:
parent
572ae5bbdf
commit
0abcc348ca
1 changed files with 3 additions and 0 deletions
|
@ -1389,6 +1389,7 @@ where
|
|||
}
|
||||
}
|
||||
|
||||
let current_span = tracing::Span::current();
|
||||
// run the Future
|
||||
let serializable = self.serializable;
|
||||
spawn_local({
|
||||
|
@ -1397,6 +1398,8 @@ where
|
|||
let set_loading = self.set_loading;
|
||||
let last_version = self.version.clone();
|
||||
async move {
|
||||
// continue trace context within resource fetcher
|
||||
let _guard = current_span.enter();
|
||||
let res = fut.await;
|
||||
|
||||
if version == last_version.get() {
|
||||
|
|
Loading…
Reference in a new issue