Complete the original attempt span if retrying due to an OOM

This commit is contained in:
Matt Aitken
2025-02-11 11:01:21 +00:00
parent 036a5061e1
commit 5f652c6212
@@ -285,6 +285,23 @@ export class CompleteAttemptService extends BaseService {
machinePreset: retryConfig.outOfMemory.machine,
},
});
//complete the attempt span
await eventRepository.completeEvent(taskRunAttempt.taskRun.spanId, {
endTime: failedAt,
attributes: {
isError: true,
},
events: [
{
name: "exception",
time: failedAt,
properties: {
exception: createExceptionPropertiesFromError(sanitizedError),
},
},
],
});
}
}