Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanwhit committed Jan 31, 2025
1 parent 3afc00c commit b83c056
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion cli/lsp/tsc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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;
}
}

Expand Down

0 comments on commit b83c056

Please sign in to comment.