selfxp commented on a change in pull request #4934:
URL: https://github.com/apache/openwhisk/pull/4934#discussion_r458543412



##########
File path: 
core/monitoring/user-events/src/test/scala/org/apache/openwhisk/core/monitoring/metrics/PrometheusRecorderTests.scala
##########
@@ -81,10 +80,7 @@ class PrometheusRecorderTests extends KafkaSpecBase with 
BeforeAndAfterEach with
     counterTotal(activationMetric, namespaceDemo, actionWithDefaultPackage) 
shouldBe 1
 
     // Blacklisted namespace should not be tracked
-    counterTotal(activationMetric, namespaceGuest, actionWithDefaultPackage) 
shouldBe 0
-
-    // Blacklisted should be counted in 
"openwhisk_namespace_activations_total" metric
-    namespaceCounterTotal(namespaceMetric, namespaceGuest) shouldBe 1
+    counterTotal(activationMetric, namespaceGuest, actionWithDefaultPackage) 
shouldBe (null)

Review comment:
       👍 

##########
File path: 
core/monitoring/user-events/src/main/scala/org/apache/openwhisk/core/monitoring/metrics/EventConsumer.scala
##########
@@ -122,15 +124,22 @@ case class EventConsumer(settings: 
ConsumerSettings[String, String],
       .foreach { e =>
         e.body match {
           case a: Activation =>
-            recorders.foreach(_.processActivation(a, e.namespace, 
metricConfig))
-            updateGlobalMetrics(a)
+            // only record activation if not executed in an ignored namespace

Review comment:
       👍  even better




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to