You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by GitBox <gi...@apache.org> on 2018/02/21 14:20:50 UTC

[GitHub] csantanapr closed pull request #3299: Remove two log messages, tweak logging with metrics, add log message for conductors

csantanapr closed pull request #3299: Remove two log messages, tweak logging with metrics, add log message for conductors
URL: https://github.com/apache/incubator-openwhisk/pull/3299
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/common/scala/src/main/scala/whisk/common/TransactionId.scala b/common/scala/src/main/scala/whisk/common/TransactionId.scala
index 09ca1fd894..4cbcd710c5 100644
--- a/common/scala/src/main/scala/whisk/common/TransactionId.scala
+++ b/common/scala/src/main/scala/whisk/common/TransactionId.scala
@@ -121,7 +121,9 @@ case class TransactionId private (meta: TransactionMetadata) extends AnyVal {
         InfoLevel,
         this,
         from,
-        createMessageWithMarker(message, LogMarker(endMarker, deltaToStart, Some(deltaToEnd))))
+        createMessageWithMarker(
+          if (logLevel <= InfoLevel) message else "",
+          LogMarker(endMarker, deltaToStart, Some(deltaToEnd))))
     } else {
       logging.emit(logLevel, this, from, message)
     }
diff --git a/core/controller/src/main/scala/whisk/core/controller/actions/PrimitiveActions.scala b/core/controller/src/main/scala/whisk/core/controller/actions/PrimitiveActions.scala
index 24817f3d69..f77d9bfec1 100644
--- a/core/controller/src/main/scala/whisk/core/controller/actions/PrimitiveActions.scala
+++ b/core/controller/src/main/scala/whisk/core/controller/actions/PrimitiveActions.scala
@@ -281,6 +281,8 @@ protected[actions] trait PrimitiveActions {
       accounting = accounting.getOrElse(CompositionAccounting()), // share accounting with caller
       logs = Buffer.empty)
 
+    logging.info(this, s"invoking composition $action topmost ${cause.isEmpty} activationid '${session.activationId}'")
+
     val response: Future[Either[ActivationId, WhiskActivation]] =
       invokeConductor(user, payload, session).map(response => Right(completeActivation(user, session, response)))
 
@@ -587,7 +589,7 @@ protected[actions] trait PrimitiveActions {
       case _ =>
         // active ack received but it does not carry the response,
         // no result available except by polling the db
-        logging.warn(this, "pre-emptively polling db because active ack is missing result")
+        logging.warn(this, "preemptively polling db because active ack is missing result")
         finisher ! Scheduler.WorkOnceNow
     }
 
diff --git a/core/controller/src/main/scala/whisk/core/controller/actions/SequenceActions.scala b/core/controller/src/main/scala/whisk/core/controller/actions/SequenceActions.scala
index 6232c0eb88..ae601f3533 100644
--- a/core/controller/src/main/scala/whisk/core/controller/actions/SequenceActions.scala
+++ b/core/controller/src/main/scala/whisk/core/controller/actions/SequenceActions.scala
@@ -73,11 +73,11 @@ protected[actions] trait SequenceActions {
    *
    * @param user the user invoking the action
    * @param action the sequence action to be invoked
-   * @param payload the dynamic arguments for the activation
-   * @param blocking true iff this is a blocking invoke
-   * @param topmost true iff this is the topmost sequence invoked directly through the api (not indirectly through a sequence)
    * @param components the actions in the sequence
+   * @param payload the dynamic arguments for the activation
+   * @param waitForOutermostResponse some duration iff this is a blocking invoke
    * @param cause the id of the activation that caused this sequence (defined only for inner sequences and None for topmost sequences)
+   * @param topmost true iff this is the topmost sequence invoked directly through the api (not indirectly through a sequence)
    * @param atomicActionsCount the dynamic atomic action count observed so far since the start of invocation of the topmost sequence(0 if topmost)
    * @param transid a transaction id for logging
    * @return a future of type (ActivationId, Some(WhiskActivation), atomicActionsCount) if blocking; else (ActivationId, None, 0)
@@ -166,7 +166,7 @@ protected[actions] trait SequenceActions {
 
         // This should never happen; in this case, there is no activation record created or stored:
         // should there be?
-        case Failure(t) => logging.error(this, s"Sequence activation failed: ${t.getMessage}")
+        case Failure(t) => logging.error(this, s"sequence activation failed: ${t.getMessage}")
       }
   }
 
@@ -326,7 +326,7 @@ protected[actions] trait SequenceActions {
       val futureWhiskActivationTuple = action.toExecutableWhiskAction match {
         case None =>
           val SequenceExecMetaData(components) = action.exec
-          logging.info(this, s"sequence invoking an enclosed sequence $action")
+          logging.debug(this, s"sequence invoking an enclosed sequence $action")
           // call invokeSequence to invoke the inner sequence; this is a blocking activation by definition
           invokeSequence(
             user,
@@ -339,7 +339,7 @@ protected[actions] trait SequenceActions {
             accounting.atomicActionCnt)
         case Some(executable) =>
           // this is an invoke for an atomic action
-          logging.info(this, s"sequence invoking an enclosed atomic action $action")
+          logging.debug(this, s"sequence invoking an enclosed atomic action $action")
           val timeout = action.limits.timeout.duration + 1.minute
           invokeAction(user, action, inputPayload, waitForResponse = Some(timeout), cause) map {
             case res => (res, accounting.atomicActionCnt + 1)
diff --git a/core/controller/src/main/scala/whisk/core/loadBalancer/ContainerPoolBalancer.scala b/core/controller/src/main/scala/whisk/core/loadBalancer/ContainerPoolBalancer.scala
index dc771a7284..193ed8da9f 100644
--- a/core/controller/src/main/scala/whisk/core/loadBalancer/ContainerPoolBalancer.scala
+++ b/core/controller/src/main/scala/whisk/core/loadBalancer/ContainerPoolBalancer.scala
@@ -185,11 +185,7 @@ class ContainerPoolBalancer(config: WhiskConfig, controllerInstance: InstanceId)
 
     producer.send(topic, msg).andThen {
       case Success(status) =>
-        transid.finished(
-          this,
-          start,
-          s"posted to ${status.topic()}[${status.partition()}][${status.offset()}]",
-          logLevel = InfoLevel)
+        transid.finished(this, start, s"posted to ${status.topic()}[${status.partition()}][${status.offset()}]")
       case Failure(e) => transid.failed(this, start, s"error on posting to topic $topic")
     }
   }


 

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services