From 834c0c4d1b31291a606a3d4061b9d5ff00c91203 Mon Sep 17 00:00:00 2001 From: Tom Tan Date: Sat, 3 Jun 2023 10:44:58 -0700 Subject: [PATCH] [DLL Build] link to opentelemetry_logs even without OTLP (#2177) --- .../exporters/otlp/otlp_grpc_metric_exporter.h | 8 ++++---- ext/src/dll/CMakeLists.txt | 12 ++++++------ 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/exporters/otlp/include/opentelemetry/exporters/otlp/otlp_grpc_metric_exporter.h b/exporters/otlp/include/opentelemetry/exporters/otlp/otlp_grpc_metric_exporter.h index 69bc8ca78d..11bb64c24f 100644 --- a/exporters/otlp/include/opentelemetry/exporters/otlp/otlp_grpc_metric_exporter.h +++ b/exporters/otlp/include/opentelemetry/exporters/otlp/otlp_grpc_metric_exporter.h @@ -5,10 +5,10 @@ // clang-format off -# include "opentelemetry/exporters/otlp/protobuf_include_prefix.h" -# include "opentelemetry/proto/collector/metrics/v1/metrics_service.grpc.pb.h" -# include "opentelemetry/common/spin_lock_mutex.h" -# include "opentelemetry/exporters/otlp/protobuf_include_suffix.h" +#include "opentelemetry/exporters/otlp/protobuf_include_prefix.h" +#include "opentelemetry/proto/collector/metrics/v1/metrics_service.grpc.pb.h" +#include "opentelemetry/common/spin_lock_mutex.h" +#include "opentelemetry/exporters/otlp/protobuf_include_suffix.h" // clang-format on diff --git a/ext/src/dll/CMakeLists.txt b/ext/src/dll/CMakeLists.txt index 4cfcd87412..d9156a5f8c 100644 --- a/ext/src/dll/CMakeLists.txt +++ b/ext/src/dll/CMakeLists.txt @@ -23,16 +23,16 @@ if(WITH_OTLP_HTTP) endif() if(WITH_LOGS_PREVIEW) + target_link_libraries(opentelemetry_cpp PRIVATE opentelemetry_logs) + if(WITH_OTLP_GRPC) - target_link_libraries( - opentelemetry_cpp PRIVATE opentelemetry_logs - opentelemetry_exporter_otlp_grpc_log) + target_link_libraries(opentelemetry_cpp + PRIVATE opentelemetry_exporter_otlp_grpc_log) endif() if(WITH_OTLP_HTTP) - target_link_libraries( - opentelemetry_cpp PRIVATE opentelemetry_logs - opentelemetry_exporter_otlp_http_log) + target_link_libraries(opentelemetry_cpp + PRIVATE opentelemetry_exporter_otlp_http_log) endif() endif()