jeremiaswerner commented on a change in pull request #2413: Integration with 
OpenTracing api
URL: 
https://github.com/apache/incubator-openwhisk/pull/2413#discussion_r125168098
 
 

 ##########
 File path: 
core/controller/src/main/scala/whisk/core/controller/actions/SequenceActions.scala
 ##########
 @@ -353,6 +369,24 @@ protected[actions] trait SequenceActions {
 
     /** Max atomic action count allowed for sequences */
     private lazy val actionSequenceLimit = 
whiskConfig.actionSequenceLimit.toInt
+
+    /** Starts the tracing for the sequence action and creates the tracing 
metadata hash map into which
+     *  the tracer implementation  inserts its own ids, these ids are then 
propagated via the ActivationMessage into
+     *  invoker that can add the reference from the primitive action to the 
parent sequence action
+     */
+    private def startTracingHelper(cause: Option[ActivationId],
 
 Review comment:
   @Jiri-Kremser yes, that's correct. We basically use a `start` and a `finish` 
marker. These markers are set in the code using a log marker token, i.e. 
`activationRun`. Setting the finish marker requires the start marker object. 
The context of this marker pair is the current transaction, i.e. user request.
   
   In the code you basically instrument a log marker as for the activation 
execution, i.e. `activationRun`:
   ```
           implicit transid: TransactionId
           ....
           val start = transid.started(this, 
LoggingMarkers.INVOKER_ACTIVATION_RUN, s"sending arguments to $actionName at 
$id $ip")
           ....
          transid.finished(this, start.copy(start = r.interval.start), 
s"running result: ${r.toBriefString}", endTime = r.interval.end)
   ```
   [example 
here](https://github.com/apache/incubator-openwhisk/blob/master/core/invoker/src/main/scala/whisk/core/containerpool/docker/DockerContainer.scala#L162)
   
   For both markers we write a log entry. The log entry for the `start` marker 
contains the time since transaction start. The log entry for the `finish` 
marker contains time since transaction start and the time since it's 
corresponding start marker.
   
   start marker (141 ms since transaction start)
   ```
   ... sending arguments to ...[marker:invoker_activationRun_start:141]
   ```
   
   finish marker (516 ms since transaction start, and time of `activationRun` 
took 400ms)
   ```
   ... running result: ok [marker:invoker_activationRun_finish:516:400] 
   ```
   
   Based on this it's possible to calculate the times within a transaction 
between start and finish markers of the same log marker token and also between 
log marker tokens.
 
----------------------------------------------------------------
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