From 057a98b44d04e3272526740fea91c0ba1b29c67e Mon Sep 17 00:00:00 2001 From: Lalit Date: Thu, 1 Dec 2022 12:08:29 -0800 Subject: [PATCH 1/4] fix --- exporters/otlp/CMakeLists.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/exporters/otlp/CMakeLists.txt b/exporters/otlp/CMakeLists.txt index a894af7374..7cecab0eca 100644 --- a/exporters/otlp/CMakeLists.txt +++ b/exporters/otlp/CMakeLists.txt @@ -2,7 +2,7 @@ add_library( opentelemetry_otlp_recordable src/otlp_log_recordable.cc src/otlp_recordable.cc src/otlp_populate_attribute_utils.cc src/otlp_recordable_utils.cc - src/otlp_metric_utils.cc src/otlp_grpc_utils.cc) + src/otlp_metric_utils.cc) set_target_properties(opentelemetry_otlp_recordable PROPERTIES EXPORT_NAME otlp_recordable) @@ -24,7 +24,8 @@ target_link_libraries(opentelemetry_otlp_recordable if(WITH_OTLP_GRPC) find_package(gRPC REQUIRED) - add_library(opentelemetry_exporter_otlp_grpc_client src/otlp_grpc_client.cc) + add_library(opentelemetry_exporter_otlp_grpc_client src/otlp_grpc_client.cc + src/otlp_grpc_utils.cc) set_target_properties(opentelemetry_exporter_otlp_grpc_client PROPERTIES EXPORT_NAME otlp_grpc_client) target_link_libraries( From 51c322dfd368e15c80cfc8d0836dc13f4fe3bf81 Mon Sep 17 00:00:00 2001 From: Lalit Date: Thu, 1 Dec 2022 12:36:43 -0800 Subject: [PATCH 2/4] bazel target fix --- exporters/otlp/BUILD | 19 ++----------------- exporters/otlp/CMakeLists.txt | 4 ++++ 2 files changed, 6 insertions(+), 17 deletions(-) diff --git a/exporters/otlp/BUILD b/exporters/otlp/BUILD index 8bb1ae2ff6..3c1701b377 100644 --- a/exporters/otlp/BUILD +++ b/exporters/otlp/BUILD @@ -46,32 +46,17 @@ cc_library( ], ) -cc_library( - name = "otlp_grpc_utils", - srcs = [ - "src/otlp_grpc_utils.cc", - ], - hdrs = [ - "include/opentelemetry/exporters/otlp/otlp_grpc_utils.h", - ], - strip_include_prefix = "include", - tags = ["otlp"], - deps = [ - "//api", - "//sdk:headers", - "@com_github_grpc_grpc//:grpc++", - ], -) - cc_library( name = "otlp_grpc_client", srcs = [ "src/otlp_grpc_client.cc", + "src/otlp_grpc_utils.cc", ], hdrs = [ "include/opentelemetry/exporters/otlp/otlp_environment.h", "include/opentelemetry/exporters/otlp/otlp_grpc_client.h", "include/opentelemetry/exporters/otlp/otlp_grpc_exporter_options.h", + "include/opentelemetry/exporters/otlp/otlp_grpc_utils.h", "include/opentelemetry/exporters/otlp/protobuf_include_prefix.h", "include/opentelemetry/exporters/otlp/protobuf_include_suffix.h", ], diff --git a/exporters/otlp/CMakeLists.txt b/exporters/otlp/CMakeLists.txt index 7cecab0eca..729dd70b58 100644 --- a/exporters/otlp/CMakeLists.txt +++ b/exporters/otlp/CMakeLists.txt @@ -49,6 +49,10 @@ if(WITH_OTLP_GRPC) list(APPEND OPENTELEMETRY_OTLP_TARGETS opentelemetry_exporter_otlp_grpc_client) + add_library(opentelemetry_exporter_otlp_grpc_utils src/otlp_grpc_utils.cc) + set_target_properties(opentelemetry_exporter_otlp_grpc_utils + PROPERTIES EXPORT_NAME otlp_grpc_utils) + add_library(opentelemetry_exporter_otlp_grpc src/otlp_grpc_exporter.cc src/otlp_grpc_exporter_factory.cc) From 59f8e7b9e66491f1b9f206d522b624d0b7a9a70d Mon Sep 17 00:00:00 2001 From: Lalit Date: Thu, 1 Dec 2022 12:38:46 -0800 Subject: [PATCH 3/4] fix --- exporters/otlp/CMakeLists.txt | 4 ---- 1 file changed, 4 deletions(-) diff --git a/exporters/otlp/CMakeLists.txt b/exporters/otlp/CMakeLists.txt index 729dd70b58..7cecab0eca 100644 --- a/exporters/otlp/CMakeLists.txt +++ b/exporters/otlp/CMakeLists.txt @@ -49,10 +49,6 @@ if(WITH_OTLP_GRPC) list(APPEND OPENTELEMETRY_OTLP_TARGETS opentelemetry_exporter_otlp_grpc_client) - add_library(opentelemetry_exporter_otlp_grpc_utils src/otlp_grpc_utils.cc) - set_target_properties(opentelemetry_exporter_otlp_grpc_utils - PROPERTIES EXPORT_NAME otlp_grpc_utils) - add_library(opentelemetry_exporter_otlp_grpc src/otlp_grpc_exporter.cc src/otlp_grpc_exporter_factory.cc) From 5316eb19aae9d5291f5f552e5d18ab37811b72c2 Mon Sep 17 00:00:00 2001 From: Lalit Date: Thu, 1 Dec 2022 12:41:52 -0800 Subject: [PATCH 4/4] fix --- exporters/otlp/BUILD | 1 - 1 file changed, 1 deletion(-) diff --git a/exporters/otlp/BUILD b/exporters/otlp/BUILD index 3c1701b377..a75188e673 100644 --- a/exporters/otlp/BUILD +++ b/exporters/otlp/BUILD @@ -96,7 +96,6 @@ cc_library( deps = [ ":otlp_recordable", ":otlp_grpc_client", - ":otlp_grpc_utils", "//ext:headers", "//sdk/src/trace",