You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/03/16 08:06:23 UTC

[GitHub] [arrow] westonpace commented on pull request #12609: ARROW-15067: [C++] Add tracing spans to the scanner

westonpace commented on pull request #12609:
URL: https://github.com/apache/arrow/pull/12609#issuecomment-1068842569


   > And maybe instead of putting Span on Future, it should be attached to the callback itself.
   
   This could work as well.  So every time we add a callback we (while adding the callback) grab the active span.  We then wrap the callback function like...
   
   ```
   auto activeSpan = GetCurrentSpan();
   auto wrapped = [activeSpan, callback] {
     SetCurrentSpan(activeSpan);
     callback();
   };
   ```
   
   (although you'd have to do an actual struct wrapper because `callback` should be move-only and we don't have move lambda captures yet)
   
   I think that's basically the same thing as what I was suggesting on the thread pool but it would only affect futures.  Given most of our thread tasks are futures I think this would probably be acceptable but I think I'd still lean towards implementing this in the executor if I were going to tackle it myself.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org