Skip to content

Commit 3676a97

Browse files
authored
add attempt created event to used codepath (#21955)
1 parent b1a0a4d commit 3676a97

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

airbyte-workers/src/main/java/io/airbyte/workers/temporal/scheduling/activities/JobCreationAndStatusUpdateActivityImpl.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,12 +223,13 @@ public AttemptNumberCreationOutput createNewAttemptNumber(final AttemptCreationI
223223
try {
224224
final long jobId = input.getJobId();
225225
ApmTraceUtils.addTagsToTrace(Map.of(JOB_ID_KEY, jobId));
226-
final Job createdJob = jobPersistence.getJob(jobId);
226+
final Job job = jobPersistence.getJob(jobId);
227227

228-
final WorkerRun workerRun = temporalWorkerRunFactory.create(createdJob);
228+
final WorkerRun workerRun = temporalWorkerRunFactory.create(job);
229229
final Path logFilePath = workerRun.getJobRoot().resolve(LogClientSingleton.LOG_FILENAME);
230230
final int persistedAttemptNumber = jobPersistence.createAttempt(jobId, logFilePath);
231231
emitJobIdToReleaseStagesMetric(OssMetricsRegistry.ATTEMPT_CREATED_BY_RELEASE_STAGE, jobId);
232+
emitAttemptCreatedEvent(job, persistedAttemptNumber);
232233

233234
LogClientSingleton.getInstance().setJobMdc(workerEnvironment, logConfigs, workerRun.getJobRoot());
234235
return new AttemptNumberCreationOutput(persistedAttemptNumber);

0 commit comments

Comments
 (0)