You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by gi...@git.apache.org on 2017/06/23 15:11:27 UTC

[GitHub] Jiri-Kremser commented on a change in pull request #2413: [wip] Draft 2 - Wrap runs within OpenTracing spans

Jiri-Kremser commented on a change in pull request #2413: [wip] Draft 2 - Wrap runs within OpenTracing spans
URL: https://github.com/apache/incubator-openwhisk/pull/2413#discussion_r123771600
 
 

 ##########
 File path: core/invoker/src/main/scala/whisk/core/container/WhiskContainer.scala
 ##########
 @@ -92,17 +96,53 @@ class WhiskContainer(
     }
 
     /**
+     * Starts the tracing.
+     */
+    private def startSpan(msg: ActivationMessage): Option[Span] = {
+        val tracerOption = if (GlobalTracer.isRegistered) Option.empty else Some(TracerResolver.resolveTracer)
 
 Review comment:
   actually, this doesn't work because 
   ```scala
   Option(GlobalTracer.isRegistered).exists(identity)
   ```
   returns either `true` or `false` and I can't call map on Boolean
   
   this works:
   
   ```scala
   Option(GlobalTracer.isRegistered).flatMap(if (_) Option.empty else Option(TracerResolver.resolveTracer))
   ```
   
   but perhaps it's too much "flatmappy" :)
 
----------------------------------------------------------------
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