quintenp01 commented on code in PR #5551:
URL: https://github.com/apache/openwhisk/pull/5551#discussion_r2441415102
##########
common/scala/src/main/scala/org/apache/openwhisk/connector/kafka/KamonMetricsReporter.scala:
##########
@@ -122,8 +122,11 @@ object KamonMetricsReporter {
}
def isCounterMetric(metric: KafkaMetric): Boolean = Try(metric.measurable())
match {
- case Success(_: Total) => true
- case _ => false
+ case Success(_: CumulativeCount) => true
+ case Success(m) if m.getClass.getSimpleName == "Total" => true
+ case Success(m) if m.getClass.getSimpleName == "WindowedSum" &&
metric.metricName().name().endsWith("-total") =>
+ true
+ case _ => false
Review Comment:
if CumulativeCount extends CumulativeSum, wouldn't we want to match
CumulativeSum to capture both?
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]