markusthoemmes commented on a change in pull request #3343: Support time-series 
DB using Kamon Tag, and optional granular metric.
URL: 
https://github.com/apache/incubator-openwhisk/pull/3343#discussion_r170419829
 
 

 ##########
 File path: common/scala/src/main/scala/whisk/common/Logging.scala
 ##########
 @@ -193,20 +210,17 @@ object MetricEmitter {
 
   def emitCounterMetric(token: LogMarkerToken): Unit = {
     if (TransactionId.metricsKamon) {
-      metrics
-        .counter(token.toString)
-        .increment(1)
+      if (token.tags.nonEmpty) metrics.counter(token.toString, 
token.tags.get).increment(1)
+      else metrics.counter(token.toString).increment(1)
 
 Review comment:
   Should be:
   
   ```scala
   token.tags match {
     case Some(tags) => metrics.counter(token.toString, token.tags).increment(1)
     case None => metrics.counter(token.toString).increment(1)
   }
   ```
   
   Same below.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to