This is an automated email from the ASF dual-hosted git repository.

bdoyle pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/openwhisk.git


The following commit(s) were added to refs/heads/master by this push:
     new a22e706b0 update scheduler not processing metric to counter (#5405)
a22e706b0 is described below

commit a22e706b0f93cf4d673a2aa5ab6110918ce149c0
Author: Brendan Doyle <[email protected]>
AuthorDate: Tue May 2 19:07:27 2023 -0700

    update scheduler not processing metric to counter (#5405)
    
    Co-authored-by: Brendan Doyle <[email protected]>
---
 .../apache/openwhisk/core/scheduler/queue/MemoryQueue.scala   | 11 ++---------
 1 file changed, 2 insertions(+), 9 deletions(-)

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 ccd53dce5..49a1688bf 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
     }
   }

Reply via email to