westonpace commented on a change in pull request #11964:
URL: https://github.com/apache/arrow/pull/11964#discussion_r771734688



##########
File path: cpp/src/arrow/dataset/file_csv.cc
##########
@@ -276,7 +291,12 @@ Result<RecordBatchGenerator> 
CsvFileFormat::ScanBatchesAsync(
   auto source = file->source();
   auto reader_fut =
       OpenReaderAsync(source, *this, scan_options, 
::arrow::internal::GetCpuThreadPool());
-  return GeneratorFromReader(std::move(reader_fut), scan_options->batch_size);
+  auto generator = GeneratorFromReader(std::move(reader_fut), 
scan_options->batch_size);
+#ifdef ARROW_WITH_OPENTELEMETRY
+  generator = arrow::internal::tracing::WrapAsyncGenerator(
+      std::move(generator), 
"arrow::dataset::CsvFileFormat::ScanBatchesAsync::Next");

Review comment:
       Ah!  Thanks, that make sense.




-- 
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-unsubscr...@arrow.apache.org

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


Reply via email to