diff --git a/cpp/src/arrow/CMakeLists.txt b/cpp/src/arrow/CMakeLists.txt index ac38c5d7da65f..7ec29ca0b6335 100644 --- a/cpp/src/arrow/CMakeLists.txt +++ b/cpp/src/arrow/CMakeLists.txt @@ -184,6 +184,7 @@ set(ARROW_SRCS status.cc table.cc table_builder.cc + telemetry/logging.cc tensor.cc tensor/coo_converter.cc tensor/csf_converter.cc @@ -236,7 +237,6 @@ set(ARROW_SRCS util/key_value_metadata.cc util/memory.cc util/mutex.cc - util/otel_logging.cc util/ree_util.cc util/string.cc util/string_builder.cc @@ -853,6 +853,7 @@ add_subdirectory(array) add_subdirectory(c) add_subdirectory(compute) add_subdirectory(io) +add_subdirectory(telemetry) add_subdirectory(tensor) add_subdirectory(util) add_subdirectory(vendored) diff --git a/cpp/src/arrow/telemetry/CMakeLists.txt b/cpp/src/arrow/telemetry/CMakeLists.txt new file mode 100644 index 0000000000000..768fe0fcf7e5b --- /dev/null +++ b/cpp/src/arrow/telemetry/CMakeLists.txt @@ -0,0 +1,23 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +# +# arrow_telemetry +# + +# Headers: top level +arrow_install_all_headers("arrow/telemetry") diff --git a/cpp/src/arrow/util/otel_logging.cc b/cpp/src/arrow/telemetry/logging.cc similarity index 98% rename from cpp/src/arrow/util/otel_logging.cc rename to cpp/src/arrow/telemetry/logging.cc index a5064c4e29435..7701e469f37f8 100644 --- a/cpp/src/arrow/util/otel_logging.cc +++ b/cpp/src/arrow/telemetry/logging.cc @@ -21,9 +21,9 @@ #include #include "arrow/result.h" +#include "arrow/telemetry/logging.h" #include "arrow/util/io_util.h" #include "arrow/util/logging.h" -#include "arrow/util/otel_logging.h" #ifdef ARROW_WITH_OPENTELEMETRY #include @@ -43,8 +43,7 @@ #endif namespace arrow { -namespace util { -namespace logging { +namespace telemetry { #ifdef ARROW_WITH_OPENTELEMETRY namespace otel = ::opentelemetry; @@ -228,6 +227,5 @@ Status LoggingEnvironment::Initialize(const LoggingOptions&) { return Status::OK std::unique_ptr MakeNoopLogger() { return std::make_unique(); } -} // namespace logging -} // namespace util +} // namespace telemetry } // namespace arrow diff --git a/cpp/src/arrow/util/otel_logging.h b/cpp/src/arrow/telemetry/logging.h similarity index 96% rename from cpp/src/arrow/util/otel_logging.h rename to cpp/src/arrow/telemetry/logging.h index f58fe9e7bb49e..8b4a1d752c5f0 100644 --- a/cpp/src/arrow/util/otel_logging.h +++ b/cpp/src/arrow/telemetry/logging.h @@ -29,10 +29,9 @@ #include "arrow/util/visibility.h" namespace arrow { -namespace util { -namespace logging { +namespace telemetry { -using LogLevel = ArrowLogLevel; +using LogLevel = util::ArrowLogLevel; /// \brief Attributes to be set in an OpenTelemetry resource /// @@ -102,6 +101,5 @@ class ARROW_EXPORT LoggingEnvironment { static inline std::unique_ptr logger_{}; }; -} // namespace logging -} // namespace util +} // namespace telemetry } // namespace arrow