markusthoemmes commented on a change in pull request #2857: Emit metrics via kamon - wip URL: https://github.com/apache/incubator-openwhisk/pull/2857#discussion_r144826997
########## File path: common/scala/src/main/scala/whisk/common/TransactionId.scala ########## @@ -55,7 +55,14 @@ case class TransactionId private (meta: TransactionMetadata) extends AnyVal { */ def mark(from: AnyRef, marker: LogMarkerToken, message: String = "", logLevel: LogLevel = InfoLevel)( implicit logging: Logging) = { - logging.emit(logLevel, this, from, createMessageWithMarker(message, LogMarker(marker, deltaToStart))) + + if (meta.metricsLog) { + logging.emit(logLevel, this, from, createMessageWithMarker(message, LogMarker(marker, deltaToStart))) + } Review comment: This is a dangerous change in behavior. I'd rather have this flagged by additional information like so: ```scala if (message.nonEmpty) { val print = if(meta.metricsLog) createMessageWithMarker(message, LogMarker(marker, deltaToStart)) else message logging.emit(logLevel, this, from, print) } Assuming that you still want the message to be printed if it was given by the developer (we should probably clean that up later and log the lines explicitly vs. implicitly through this class, but it keeps the changes small for now) ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services