joosthooz commented on a change in pull request #12609:
URL: https://github.com/apache/arrow/pull/12609#discussion_r840653966
##########
File path: cpp/src/arrow/util/tracing_internal.h
##########
@@ -146,6 +210,22 @@ opentelemetry::trace::StartSpanOptions
SpanOptionsWithParent(
return st;
\
})
+#define GET_CURRENT_SPAN(lhs) \
+ lhs = ::arrow::internal::tracing::GetTracer()->GetCurrentSpan()
+
+#define SET_SPAN_SCOPE(lhs, span) \
+ lhs = ::arrow::internal::tracing::GetTracer()->WithActiveSpan(span)
+
+#define TIE_SPAN_TO_GENERATOR(generator) \
+ generator =
::arrow::internal::tracing::TieSpanToAsyncGenerator(std::move(generator))
+
+#define PROPAGATE_SPAN_TO_GENERATOR(generator) \
+ generator = ::arrow::internal::tracing::PropagateSpanThroughAsyncGenerator( \
+ std::move(generator))
+
+#define WRAP_ASYNC_GENERATOR(generator, name) \
+ generator =
::arrow::internal::tracing::WrapAsyncGenerator(std::move(generator), name)
+
Review comment:
This was discussed earlier; this was my response:
Their purpose is to have blank versions when compiling without opentelemetry
```
#ifdef ARROW_WITH_OPENTELEMETRY
#define GET_CURRENT_SPAN(span) \
auto span = ::arrow::internal::tracing::GetTracer()->GetCurrentSpan()
...
#else
#define START_SPAN(target_span, ...)
```
So if I remove them, I need to guard all of the calls to these functions
with #ifdef ARROW_WITH_OPENTELEMETRY
--
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]