File tree Expand file tree Collapse file tree
apps/webapp/app/presenters/v3 Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -395,11 +395,16 @@ export class SpanPresenter extends BasePresenter {
395395 let cell : string | undefined ;
396396 if ( isAdmin ) {
397397 try {
398- // Use the resolved run's own trace + time window (not the parent's) so
399- // the lookup is correct for cached/linked spans, where `run` is the
400- // original run rather than `parentRun`.
401- const rootSpan = await eventRepository . getSpan (
402- eventStore ,
398+ // Resolve the store + repository from the resolved run itself (not the
399+ // parent) so cached/linked spans - where `run` is the original run and
400+ // may live in a different event store - resolve correctly.
401+ const runEventStore = getTaskEventStoreTableForRun ( run ) ;
402+ const runEventRepository = await getEventRepositoryForStore (
403+ run . taskEventStore ,
404+ environment . organization . id
405+ ) ;
406+ const rootSpan = await runEventRepository . getSpan (
407+ runEventStore ,
403408 environmentId ,
404409 run . spanId ,
405410 run . traceId ,
You can’t perform that action at this time.
0 commit comments