diff --git a/ci/otel_collector/BUILD.bazel b/ci/otel_collector/BUILD.bazel index 4f1adaf496ae2..3c90872bda823 100644 --- a/ci/otel_collector/BUILD.bazel +++ b/ci/otel_collector/BUILD.bazel @@ -21,6 +21,7 @@ cc_library( srcs = ["otel_collector.cc"], hdrs = ["otel_collector.h"], deps = [ + "//:common", "//protos/google/cloud/opentelemetry/testing:observability_verification_cc_grpc", "//protos/google/cloud/opentelemetry/testing:observability_verification_cc_proto", "@googleapis//google/monitoring/v3:monitoring_cc_grpc", diff --git a/ci/otel_collector/CMakeLists.txt b/ci/otel_collector/CMakeLists.txt index 313ac861ead35..58630a4fe0717 100644 --- a/ci/otel_collector/CMakeLists.txt +++ b/ci/otel_collector/CMakeLists.txt @@ -20,10 +20,11 @@ add_library(otel_collector otel_collector.cc otel_collector.h) target_link_libraries( otel_collector PUBLIC google_cloud_cpp_opentelemetry_testing_protos google-cloud-cpp::monitoring_protos gRPC::grpc++) -target_include_directories(otel_collector PUBLIC ${PROJECT_SOURCE_DIR}) +target_include_directories(otel_collector PUBLIC ${PROJECT_SOURCE_DIR} + ${PROJECT_BINARY_DIR}) google_cloud_cpp_add_common_options(otel_collector NO_WARNINGS) google_cloud_cpp_add_executable(target "otel_collector_main" "otel_collector_main.cc") -target_link_libraries(otel_collector_main PRIVATE otel_collector gRPC::grpc++) -google_cloud_cpp_add_common_options(otel_collector_main NO_WARNINGS) +target_link_libraries(${target} PRIVATE otel_collector gRPC::grpc++) +google_cloud_cpp_add_common_options(${target} NO_WARNINGS) diff --git a/ci/otel_collector/otel_collector.cc b/ci/otel_collector/otel_collector.cc index 36251f17e467e..8e0884d13b0d9 100644 --- a/ci/otel_collector/otel_collector.cc +++ b/ci/otel_collector/otel_collector.cc @@ -16,6 +16,7 @@ namespace google { namespace cloud { +GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN namespace testing_util { grpc::Status OtelCollectorServer::CreateTimeSeries( @@ -68,5 +69,6 @@ void OtelCollectorServer::Clear() { } } // namespace testing_util +GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google diff --git a/ci/otel_collector/otel_collector.h b/ci/otel_collector/otel_collector.h index 145c5b31fdd8a..43de850bd7b18 100644 --- a/ci/otel_collector/otel_collector.h +++ b/ci/otel_collector/otel_collector.h @@ -15,6 +15,7 @@ #ifndef GOOGLE_CLOUD_CPP_CI_OTEL_COLLECTOR_OTEL_COLLECTOR_H #define GOOGLE_CLOUD_CPP_CI_OTEL_COLLECTOR_OTEL_COLLECTOR_H +#include "google/cloud/version.h" #include "protos/google/cloud/opentelemetry/testing/observability_verification.grpc.pb.h" #include #include @@ -23,6 +24,7 @@ namespace google { namespace cloud { +GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN namespace testing_util { /** @@ -71,6 +73,7 @@ class OtelCollectorServer final }; } // namespace testing_util +GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google