Skip to content

Commit

Permalink
Add connection ID to span (#18852)
Browse files Browse the repository at this point in the history
  • Loading branch information
jdpgrailsdev authored Nov 2, 2022
1 parent b77d039 commit 7c2c701
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -259,8 +259,6 @@ public void jobSuccessWithAttemptNumber(final JobSuccessInputWithAttemptNumber i
@Override
public void jobFailure(final JobFailureInput input) {
try {
ApmTraceUtils.addTagsToTrace(Map.of(JOB_ID_KEY, input.getJobId()));

final long jobId = input.getJobId();
jobPersistence.failJob(jobId);
final Job job = jobPersistence.getJob(jobId);
Expand All @@ -269,6 +267,7 @@ public void jobFailure(final JobFailureInput input) {
emitJobIdToReleaseStagesMetric(OssMetricsRegistry.JOB_FAILED_BY_RELEASE_STAGE, jobId);

final UUID connectionId = UUID.fromString(job.getScope());
ApmTraceUtils.addTagsToTrace(Map.of(CONNECTION_ID_KEY, connectionId, JOB_ID_KEY, jobId));
final JobSyncConfig jobSyncConfig = job.getConfig().getSync();
final SyncJobReportingContext jobContext =
new SyncJobReportingContext(jobId, jobSyncConfig.getSourceDockerImage(), jobSyncConfig.getDestinationDockerImage());
Expand Down

0 comments on commit 7c2c701

Please sign in to comment.