diff --git a/internal/scheduler/metrics/metrics.go b/internal/scheduler/metrics/metrics.go index 4bfa38d7b6b..3d4ef5613ee 100644 --- a/internal/scheduler/metrics/metrics.go +++ b/internal/scheduler/metrics/metrics.go @@ -27,6 +27,7 @@ const ( podError = "podError" podLeaseReturned = "podLeaseReturned" podTerminated = "podTerminated" + jobRunPreempted = "jobRunPreempted" queued = "queued" cancelled = "cancelled" @@ -363,6 +364,8 @@ func errorTypeAndMessageFromError(ctx *armadacontext.Context, err *armadaevents. return podLeaseReturned, reason.PodLeaseReturned.Message case *armadaevents.Error_PodTerminated: return podTerminated, reason.PodTerminated.Message + case *armadaevents.Error_JobRunPreemptedError: + return jobRunPreempted, "" default: ctx.Warnf("omitting name and message for unknown error type %T", err.Reason) return "", ""