Skip to content

Commit

Permalink
Don't create span for parallel chunking type
Browse files Browse the repository at this point in the history
  • Loading branch information
mischnic committed Jan 20, 2025
1 parent 169829a commit b0b0c5c
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions turbopack/crates/turbopack-core/src/module_graph/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use petgraph::{
visit::{Dfs, EdgeRef, IntoNodeReferences, VisitMap, Visitable},
};
use serde::{Deserialize, Serialize};
use tracing::Instrument;
use tracing::{Instrument, Span};
use turbo_rcstr::RcStr;
use turbo_tasks::{
debug::ValueDebugFormat,
Expand Down Expand Up @@ -1077,14 +1077,17 @@ impl Visit<SingleModuleGraphBuilderNode> for SingleModuleGraphBuilder<'_> {
source_ident,
target_ident,
..
} => {
tracing::info_span!(
"chunkable reference",
ty = debug(chunking_type),
source = display(source_ident),
target = display(target_ident)
)
}
} => match chunking_type {
ChunkingType::Parallel => Span::current(),
_ => {
tracing::info_span!(
"chunkable reference",
ty = debug(chunking_type),
source = display(source_ident),
target = display(target_ident)
)
}
},
SingleModuleGraphBuilderNode::VisitedModule { .. } => {
tracing::info_span!("visited module")
}
Expand Down

0 comments on commit b0b0c5c

Please sign in to comment.