Effect CommunityEC
Effect Community7mo ago
15 replies
ShinGensou

Inaccurate Span Duration Measurements with `Effect.all` and Concurrency

Hi folks - when I'm using Effect.all with concurrency, it seems like I stop getting accurate duration measurements of the spans therein. Each of the functions called here are made with Effect.fn. Is this outcome expected?

const [activeViewVersion, booksClosedDate, legalEntityPreferences, ledgerName] =
    yield* Effect.all(
      [
        getActiveViewVersion(legalEntityId, viewType),
        getBooksClosedDate(legalEntityId),
        getLegalEntityPreferences(legalEntityId),
        getLedgerType(legalEntityId),
      ],
      { concurrency: "unbounded" }
    ).pipe(Effect.withSpan("Effect.all"))
Was this page helpful?