Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correct cancelled job metric name. #10658

Merged
merged 10 commits into from
Feb 25, 2022
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,14 @@
*/
public class MetricTags {

private static final String RELEASE_STAGE = "release_stage:";
private static final String RELEASE_STAGE = "release_stage";

public static String getReleaseStage(final ReleaseStage stage) {
return RELEASE_STAGE + ":" + stage.getLiteral();
return tagDelimit(RELEASE_STAGE, stage.getLiteral());
}

private static String tagDelimit(final String tagName, final String tagVal) {
return String.join(":", tagName, tagVal);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ public void jobCancelled(final JobCancelledInput input) {

final Job job = jobPersistence.getJob(jobId);
trackCompletion(job, JobStatus.FAILED);
emitJobIdToReleaseStagesMetric(MetricsRegistry.JOB_SUCCEEDED_BY_RELEASE_STAGE, jobId);
emitJobIdToReleaseStagesMetric(MetricsRegistry.JOB_CANCELLED_BY_RELEASE_STAGE, jobId);
jobNotifier.failJob("Job was cancelled", job);
} catch (final IOException e) {
throw new RetryableException(e);
Expand Down