Skip to content

Commit 5f652c6

Browse files
committed
Complete the original attempt span if retrying due to an OOM
1 parent 036a506 commit 5f652c6

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

apps/webapp/app/v3/services/completeAttempt.server.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,23 @@ export class CompleteAttemptService extends BaseService {
285285
machinePreset: retryConfig.outOfMemory.machine,
286286
},
287287
});
288+
289+
//complete the attempt span
290+
await eventRepository.completeEvent(taskRunAttempt.taskRun.spanId, {
291+
endTime: failedAt,
292+
attributes: {
293+
isError: true,
294+
},
295+
events: [
296+
{
297+
name: "exception",
298+
time: failedAt,
299+
properties: {
300+
exception: createExceptionPropertiesFromError(sanitizedError),
301+
},
302+
},
303+
],
304+
});
288305
}
289306
}
290307

0 commit comments

Comments
 (0)