Skip to content

Commit 37267ea

Browse files
committed
fix(webapp): resolve cell lookup event store from the original run
1 parent aafa807 commit 37267ea

1 file changed

Lines changed: 10 additions & 5 deletions

File tree

apps/webapp/app/presenters/v3/SpanPresenter.server.ts

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff 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,

0 commit comments

Comments
 (0)