diff --git a/core/scheduler/src/main/scala/org/apache/openwhisk/core/scheduler/queue/MemoryQueue.scala b/core/scheduler/src/main/scala/org/apache/openwhisk/core/scheduler/queue/MemoryQueue.scala index ccd53dce546..49a1688bfa8 100644 --- a/core/scheduler/src/main/scala/org/apache/openwhisk/core/scheduler/queue/MemoryQueue.scala +++ b/core/scheduler/src/main/scala/org/apache/openwhisk/core/scheduler/queue/MemoryQueue.scala @@ -1218,17 +1218,10 @@ object MemoryQueue { s"[$invocationNamespace:$action:$stateName] some activations are stale msg: ${queue.head.msg.activationId}.") val timeSinceLastActivationGrabbed = clock.now().toEpochMilli - lastActivationExecutedTime.get() if (timeSinceLastActivationGrabbed > maxRetentionMs && timeSinceLastActivationGrabbed > actionMetaData.limits.timeout.millis) { - MetricEmitter.emitGaugeMetric( + MetricEmitter.emitCounterMetric( LoggingMarkers - .SCHEDULER_QUEUE_NOT_PROCESSING(invocationNamespace, action.asString, action.toStringWithoutVersion), - 1) - } else { - MetricEmitter.emitGaugeMetric( - LoggingMarkers - .SCHEDULER_QUEUE_NOT_PROCESSING(invocationNamespace, action.asString, action.toStringWithoutVersion), - 0) + .SCHEDULER_QUEUE_NOT_PROCESSING(invocationNamespace, action.asString, action.toStringWithoutVersion)) } - queueRef ! DropOld } }