Unverified Commit 0714c457 authored by Tobias Koppers's avatar Tobias Koppers Committed by GitHub

[Turbopack] fix effects tracing (#72928)

### What?

small follow-up to fix the tracing of Effects::apply
parent fe5ef9bb
......@@ -174,12 +174,16 @@ impl Eq for Effects {}
impl Effects {
/// Applies all effects that have been captured by this struct.
pub async fn apply(&self) -> Result<()> {
let _span = tracing::info_span!("apply effects", count = self.effects.len());
let mut first_error = anyhow::Ok(());
for effect in self.effects.iter() {
apply_effect(effect, &mut first_error).await;
let span = tracing::info_span!("apply effects", count = self.effects.len());
async move {
let mut first_error = anyhow::Ok(());
for effect in self.effects.iter() {
apply_effect(effect, &mut first_error).await;
}
first_error
}
first_error
.instrument(span)
.await
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment