Skip to content

Commit 538a216

Browse files
committed
ci: otel_collector updates
1 parent f07c472 commit 538a216

4 files changed

Lines changed: 11 additions & 3 deletions

File tree

ci/otel_collector/BUILD.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ cc_library(
2121
srcs = ["otel_collector.cc"],
2222
hdrs = ["otel_collector.h"],
2323
deps = [
24+
"//:common",
2425
"//protos/google/cloud/opentelemetry/testing:observability_verification_cc_grpc",
2526
"//protos/google/cloud/opentelemetry/testing:observability_verification_cc_proto",
2627
"@googleapis//google/monitoring/v3:monitoring_cc_grpc",

ci/otel_collector/CMakeLists.txt

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,12 @@ add_library(otel_collector otel_collector.cc otel_collector.h)
2020
target_link_libraries(
2121
otel_collector PUBLIC google_cloud_cpp_opentelemetry_testing_protos
2222
google-cloud-cpp::monitoring_protos gRPC::grpc++)
23-
target_include_directories(otel_collector PUBLIC ${PROJECT_SOURCE_DIR})
23+
add_dependencies(otel_collector google_cloud_cpp_opentelemetry_testing_protos)
24+
target_include_directories(otel_collector PUBLIC ${PROJECT_SOURCE_DIR}
25+
${PROJECT_BINARY_DIR})
2426
google_cloud_cpp_add_common_options(otel_collector NO_WARNINGS)
2527

2628
google_cloud_cpp_add_executable(target "otel_collector_main"
2729
"otel_collector_main.cc")
28-
target_link_libraries(otel_collector_main PRIVATE otel_collector gRPC::grpc++)
29-
google_cloud_cpp_add_common_options(otel_collector_main NO_WARNINGS)
30+
target_link_libraries(${target} PRIVATE otel_collector gRPC::grpc++)
31+
google_cloud_cpp_add_common_options(${target} NO_WARNINGS)

ci/otel_collector/otel_collector.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
namespace google {
1818
namespace cloud {
19+
GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN
1920
namespace testing_util {
2021

2122
grpc::Status OtelCollectorServer::CreateTimeSeries(
@@ -68,5 +69,6 @@ void OtelCollectorServer::Clear() {
6869
}
6970

7071
} // namespace testing_util
72+
GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END
7173
} // namespace cloud
7274
} // namespace google

ci/otel_collector/otel_collector.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
#ifndef GOOGLE_CLOUD_CPP_CI_OTEL_COLLECTOR_OTEL_COLLECTOR_H
1616
#define GOOGLE_CLOUD_CPP_CI_OTEL_COLLECTOR_OTEL_COLLECTOR_H
1717

18+
#include "google/cloud/version.h"
1819
#include "protos/google/cloud/opentelemetry/testing/observability_verification.grpc.pb.h"
1920
#include <google/monitoring/v3/metric_service.grpc.pb.h>
2021
#include <grpcpp/grpcpp.h>
@@ -23,6 +24,7 @@
2324

2425
namespace google {
2526
namespace cloud {
27+
GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN
2628
namespace testing_util {
2729

2830
/**
@@ -71,6 +73,7 @@ class OtelCollectorServer final
7173
};
7274

7375
} // namespace testing_util
76+
GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END
7477
} // namespace cloud
7578
} // namespace google
7679

0 commit comments

Comments
 (0)