lidavidm commented on a change in pull request #11964:
URL: https://github.com/apache/arrow/pull/11964#discussion_r780554473
##########
File path: cpp/src/arrow/dataset/file_csv.cc
##########
@@ -148,9 +149,14 @@ static inline Result<csv::ReadOptions> GetReadOptions(
static inline Future<std::shared_ptr<csv::StreamingReader>> OpenReaderAsync(
const FileSource& source, const CsvFileFormat& format,
const std::shared_ptr<ScanOptions>& scan_options, Executor* cpu_executor) {
+#ifdef ARROW_WITH_OPENTELEMETRY
+ auto tracer = arrow::internal::tracing::GetTracer();
+ auto span =
tracer->StartSpan("arrow::dataset::CsvFileFormat::OpenReaderAsync");
+#endif
ARROW_ASSIGN_OR_RAISE(auto reader_options, GetReadOptions(format,
scan_options));
Review comment:
The span will be marked as finished in its destructor by default.
Explicit marking is only required when you want to control the end time:
https://github.com/open-telemetry/opentelemetry-cpp/blob/f20f72f3a904b215fc750b67b206f158aeb61241/sdk/src/trace/span.cc#L89-L92
--
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]