mirror of
https://github.com/denoland/deno.git
synced 2025-02-01 12:16:11 -05:00
fixup
This commit is contained in:
parent
3afc00c30c
commit
b83c05620f
1 changed files with 11 additions and 1 deletions
|
@ -4738,6 +4738,16 @@ struct TracingSpan(#[allow(dead_code)] tracing::span::EnteredSpan);
|
|||
|
||||
deno_core::external!(TracingSpan, "tracingspan");
|
||||
|
||||
fn span_with_context(
|
||||
state: &State,
|
||||
span: tracing::Span,
|
||||
) -> tracing::span::EnteredSpan {
|
||||
if let Some(context) = &state.context {
|
||||
span.set_parent(context.clone());
|
||||
}
|
||||
span.entered()
|
||||
}
|
||||
|
||||
#[op2(fast)]
|
||||
fn op_make_span(
|
||||
op_state: &mut OpState,
|
||||
|
@ -4760,7 +4770,7 @@ fn op_exit_span(op_state: &mut OpState, span: *const c_void, root: bool) {
|
|||
let _span = unsafe { ptr.unsafely_take().0 };
|
||||
if root {
|
||||
let state = op_state.borrow_mut::<State>();
|
||||
state.context.pop();
|
||||
state.context = None;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue