Skip to content

Commit

Permalink
Remove separate ARROW_TELEMETRY CMake option
Browse files Browse the repository at this point in the history
  • Loading branch information
benibus committed May 23, 2024
1 parent a1422e5 commit c45b759
Show file tree
Hide file tree
Showing 10 changed files with 18 additions and 18 deletions.
6 changes: 0 additions & 6 deletions cpp/cmake_modules/DefineOptions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -417,12 +417,6 @@ takes precedence over ccache if a storage backend is configured" ON)
ARROW_IPC
ARROW_PARQUET)

define_option(ARROW_TELEMETRY
"Build Arrow with extended telemetry support (requires OpenTelemetry)"
OFF
DEPENDS
ARROW_WITH_OPENTELEMETRY)

define_option(ARROW_TENSORFLOW "Build Arrow with TensorFlow support enabled" OFF)

define_option(ARROW_TESTING
Expand Down
6 changes: 6 additions & 0 deletions cpp/cmake_modules/ThirdpartyToolchain.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4694,6 +4694,12 @@ macro(build_opentelemetry)
-DWITH_OTLP_GRPC=OFF
# Disabled because it seemed to cause linking errors. May be worth a closer look.
-DWITH_FUNC_TESTS=OFF
# These options are slated for removal in v1.14 and their features are deemed stable
# as of v1.13. However, setting their corresponding ENABLE_* macros in headers seems
# finicky - resulting in build failures or ABI-related runtime errors during HTTP
# client initialization. There may still be a solution, but we disable them for now.
-DWITH_OTLP_HTTP_SSL_PREVIEW=OFF
-DWITH_OTLP_HTTP_SSL_TLS_PREVIEW=OFF
"-DProtobuf_INCLUDE_DIR=${OPENTELEMETRY_PROTOBUF_INCLUDE_DIR}"
"-DProtobuf_LIBRARY=${OPENTELEMETRY_PROTOBUF_INCLUDE_DIR}"
"-DProtobuf_PROTOC_EXECUTABLE=${OPENTELEMETRY_PROTOC_EXECUTABLE}")
Expand Down
4 changes: 2 additions & 2 deletions cpp/src/arrow/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -621,7 +621,7 @@ if(ARROW_WITH_ZSTD)
endforeach()
endif()

if(ARROW_TELEMETRY)
if(ARROW_WITH_OPENTELEMETRY)
arrow_add_object_library(ARROW_TELEMETRY telemetry/logging.cc)

foreach(ARROW_TELEMETRY_TARGET ${ARROW_TELEMETRY_TARGETS})
Expand Down Expand Up @@ -1267,7 +1267,7 @@ if(ARROW_SUBSTRAIT)
add_subdirectory(engine)
endif()

if(ARROW_TELEMETRY)
if(ARROW_WITH_OPENTELEMETRY)
add_subdirectory(telemetry)
endif()

Expand Down
2 changes: 1 addition & 1 deletion cpp/src/arrow/flight/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ set(ARROW_FLIGHT_SRCS
transport/grpc/util_internal.cc
types.cc)

if(ARROW_TELEMETRY)
if(ARROW_WITH_OPENTELEMETRY)
list(APPEND ARROW_FLIGHT_SRCS otel_logging.cc)
endif()

Expand Down
1 change: 1 addition & 0 deletions cpp/src/arrow/flight/otel_logging.cc
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

#include <string_view>

#include "arrow/flight/otel_logging.h"
#include "arrow/flight/otel_logging_internal.h"
#include "arrow/result.h"
#include "arrow/util/logger.h"
Expand Down
2 changes: 1 addition & 1 deletion cpp/src/arrow/flight/otel_logging.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

#include "arrow/util/config.h"

#ifdef ARROW_TELEMETRY
#ifdef ARROW_WITH_OPENTELEMETRY
#include "arrow/status.h"
#include "arrow/telemetry/logging.h"
#include "arrow/util/macros.h"
Expand Down
2 changes: 1 addition & 1 deletion cpp/src/arrow/flight/otel_logging_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#include "arrow/util/config.h"

#include "arrow/util/macros.h"
#ifdef ARROW_TELEMETRY
#ifdef ARROW_WITH_OPENTELEMETRY
#include "arrow/flight/otel_logging.h"
#include "arrow/util/logger.h"

Expand Down
6 changes: 3 additions & 3 deletions cpp/src/arrow/flight/sql/test_app_cli.cc
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
#include "arrow/status.h"
#include "arrow/table.h"

#ifdef ARROW_TELEMETRY
#ifdef ARROW_WITH_OPENTELEMETRY
#include "arrow/flight/otel_logging.h"
#include "arrow/util/tracing_internal.h"

Expand Down Expand Up @@ -75,7 +75,7 @@ DEFINE_string(catalog, "", "Catalog");
DEFINE_string(schema, "", "Schema");
DEFINE_string(table, "", "Table");

#ifdef ARROW_TELEMETRY
#ifdef ARROW_WITH_OPENTELEMETRY
class OtelScope {
public:
explicit OtelScope(opentelemetry::trace::Scope scope) : scope_(std::move(scope)) {}
Expand Down Expand Up @@ -153,7 +153,7 @@ Status PrintResults(FlightSqlClient& client, const FlightCallOptions& call_optio
}

Status RunMain() {
#ifdef ARROW_TELEMETRY
#ifdef ARROW_WITH_OPENTELEMETRY
ARROW_ASSIGN_OR_RAISE(auto otel_scope, OtelScope::Make());
#endif

Expand Down
6 changes: 3 additions & 3 deletions cpp/src/arrow/flight/sql/test_server_cli.cc
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
#include "arrow/io/test_common.h"
#include "arrow/util/logging.h"

#ifdef ARROW_TELEMETRY
#ifdef ARROW_WITH_OPENTELEMETRY
#include "arrow/flight/otel_logging.h"
#include "arrow/util/tracing_internal.h"

Expand All @@ -41,7 +41,7 @@

DEFINE_int32(port, 31337, "Server port to listen on");

#ifdef ARROW_TELEMETRY
#ifdef ARROW_WITH_OPENTELEMETRY
arrow::Status SetupOTel() {
auto tracer = arrow::internal::tracing::GetTracer();
ARROW_UNUSED(tracer);
Expand All @@ -64,7 +64,7 @@ arrow::Status SetupOTel() {
#endif

arrow::Status RunMain() {
#ifdef ARROW_TELEMETRY
#ifdef ARROW_WITH_OPENTELEMETRY
ARROW_RETURN_NOT_OK(SetupOTel());
#endif

Expand Down
1 change: 0 additions & 1 deletion cpp/src/arrow/util/config.h.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@
#cmakedefine ARROW_ORC
#cmakedefine ARROW_PARQUET
#cmakedefine ARROW_SUBSTRAIT
#cmakedefine ARROW_TELEMETRY

#cmakedefine ARROW_AZURE
#cmakedefine ARROW_ENABLE_THREADING
Expand Down

0 comments on commit c45b759

Please sign in to comment.