lidavidm commented on a change in pull request #12100:
URL: https://github.com/apache/arrow/pull/12100#discussion_r786017483



##########
File path: cpp/src/arrow/compute/exec/aggregate_node.cc
##########
@@ -165,7 +166,18 @@ class ScalarAggregateNode : public ExecNode {
   const char* kind_name() const override { return "ScalarAggregateNode"; }
 
   Status DoConsume(const ExecBatch& batch, size_t thread_index) {
+    util::tracing::Span span;
+    START_SPAN(span, "Consume",
+               {{"aggregate", ToStringExtra()},
+                {"node.label", label()},
+                {"batch.length", batch.length}});
     for (size_t i = 0; i < kernels_.size(); ++i) {
+      util::tracing::Span span;
+      START_SPAN(span, aggs_[i].function,

Review comment:
       Or maybe not, we'll have to see what structure is best for analysis. 
(e.g. do we want to put node labels in the span names - maybe/probably, do we 
want function names in the span names - maybe not if it means we have too many 
distinct span names for visualization)

##########
File path: cpp/src/arrow/compute/exec/aggregate_node.cc
##########
@@ -165,7 +166,18 @@ class ScalarAggregateNode : public ExecNode {
   const char* kind_name() const override { return "ScalarAggregateNode"; }
 
   Status DoConsume(const ExecBatch& batch, size_t thread_index) {
+    util::tracing::Span span;
+    START_SPAN(span, "Consume",
+               {{"aggregate", ToStringExtra()},
+                {"node.label", label()},
+                {"batch.length", batch.length}});
     for (size_t i = 0; i < kernels_.size(); ++i) {
+      util::tracing::Span span;
+      START_SPAN(span, aggs_[i].function,

Review comment:
       Hmm, if we have the function name in the attribute, maybe the span name 
should be something generic like `ScalarAggregateConsume`?




-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to