From 4c3408d6b5078034f0537e4aea405356a6c351db Mon Sep 17 00:00:00 2001 From: Lalit Date: Thu, 10 Nov 2022 16:03:27 -0800 Subject: [PATCH 1/3] change prometheus cmake target name --- exporters/prometheus/CMakeLists.txt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/exporters/prometheus/CMakeLists.txt b/exporters/prometheus/CMakeLists.txt index 7c7cbf5444..01188e3db8 100644 --- a/exporters/prometheus/CMakeLists.txt +++ b/exporters/prometheus/CMakeLists.txt @@ -17,14 +17,14 @@ if(NOT TARGET prometheus-cpp::core) find_package(prometheus-cpp CONFIG REQUIRED) endif() -add_library(prometheus_exporter src/exporter.cc src/collector.cc - src/exporter_utils.cc) +add_library(opentelemetry_exporter_prometheus src/exporter.cc src/collector.cc + src/exporter_utils.cc) target_include_directories( - prometheus_exporter + opetelemetry_exporter_prometheus PUBLIC "$" "$") -set(PROMETHEUS_EXPORTER_TARGETS prometheus_exporter) +set(PROMETHEUS_EXPORTER_TARGETS opetelemetry_exporter_prometheus) if(TARGET pull) list(APPEND PROMETHEUS_EXPORTER_TARGETS pull) endif() @@ -32,8 +32,8 @@ if(TARGET core) list(APPEND PROMETHEUS_EXPORTER_TARGETS core) endif() target_link_libraries( - prometheus_exporter PUBLIC opentelemetry_metrics prometheus-cpp::pull - prometheus-cpp::core) + opetelemetry_exporter_prometheus + PUBLIC opentelemetry_metrics prometheus-cpp::pull prometheus-cpp::core) install( TARGETS ${PROMETHEUS_EXPORTER_TARGETS} EXPORT "${PROJECT_NAME}-target" From dea7668f98f297e318446665a016af6e4a75064a Mon Sep 17 00:00:00 2001 From: Lalit Date: Thu, 10 Nov 2022 17:13:42 -0800 Subject: [PATCH 2/3] fix --- examples/prometheus/CMakeLists.txt | 2 +- exporters/prometheus/CMakeLists.txt | 6 +++--- exporters/prometheus/test/CMakeLists.txt | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/examples/prometheus/CMakeLists.txt b/examples/prometheus/CMakeLists.txt index b377920dee..f3118a00e9 100644 --- a/examples/prometheus/CMakeLists.txt +++ b/examples/prometheus/CMakeLists.txt @@ -2,4 +2,4 @@ include_directories(${CMAKE_SOURCE_DIR}/exporters/prometheus/include) add_executable(prometheus_example main.cc) target_link_libraries( prometheus_example ${CMAKE_THREAD_LIBS_INIT} opentelemetry_metrics - prometheus_exporter opentelemetry_resources common_metrics_foo_library) + opentelemetry_exporter_prometheus opentelemetry_resources common_metrics_foo_library) diff --git a/exporters/prometheus/CMakeLists.txt b/exporters/prometheus/CMakeLists.txt index 01188e3db8..bdafeb1588 100644 --- a/exporters/prometheus/CMakeLists.txt +++ b/exporters/prometheus/CMakeLists.txt @@ -20,11 +20,11 @@ endif() add_library(opentelemetry_exporter_prometheus src/exporter.cc src/collector.cc src/exporter_utils.cc) target_include_directories( - opetelemetry_exporter_prometheus + opentelemetry_exporter_prometheus PUBLIC "$" "$") -set(PROMETHEUS_EXPORTER_TARGETS opetelemetry_exporter_prometheus) +set(PROMETHEUS_EXPORTER_TARGETS opentelemetry_exporter_prometheus) if(TARGET pull) list(APPEND PROMETHEUS_EXPORTER_TARGETS pull) endif() @@ -32,7 +32,7 @@ if(TARGET core) list(APPEND PROMETHEUS_EXPORTER_TARGETS core) endif() target_link_libraries( - opetelemetry_exporter_prometheus + opentelemetry_exporter_prometheus PUBLIC opentelemetry_metrics prometheus-cpp::pull prometheus-cpp::core) install( TARGETS ${PROMETHEUS_EXPORTER_TARGETS} diff --git a/exporters/prometheus/test/CMakeLists.txt b/exporters/prometheus/test/CMakeLists.txt index a954357488..245c36bcd4 100644 --- a/exporters/prometheus/test/CMakeLists.txt +++ b/exporters/prometheus/test/CMakeLists.txt @@ -2,7 +2,7 @@ foreach(testname exporter_test collector_test exporter_utils_test) add_executable(${testname} "${testname}.cc") target_link_libraries( ${testname} ${GTEST_BOTH_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} - prometheus_exporter prometheus-cpp::pull opentelemetry_resources) + opentelemetry_exporter_prometheus prometheus-cpp::pull opentelemetry_resources) gtest_add_tests( TARGET ${testname} TEST_PREFIX exporter. From 31cd0531f3afd9c516c6ef3d62d9b04270aea0af Mon Sep 17 00:00:00 2001 From: Lalit Date: Thu, 10 Nov 2022 18:13:42 -0800 Subject: [PATCH 3/3] format --- examples/prometheus/CMakeLists.txt | 3 ++- exporters/prometheus/test/CMakeLists.txt | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/examples/prometheus/CMakeLists.txt b/examples/prometheus/CMakeLists.txt index f3118a00e9..bee3e7f782 100644 --- a/examples/prometheus/CMakeLists.txt +++ b/examples/prometheus/CMakeLists.txt @@ -2,4 +2,5 @@ include_directories(${CMAKE_SOURCE_DIR}/exporters/prometheus/include) add_executable(prometheus_example main.cc) target_link_libraries( prometheus_example ${CMAKE_THREAD_LIBS_INIT} opentelemetry_metrics - opentelemetry_exporter_prometheus opentelemetry_resources common_metrics_foo_library) + opentelemetry_exporter_prometheus opentelemetry_resources + common_metrics_foo_library) diff --git a/exporters/prometheus/test/CMakeLists.txt b/exporters/prometheus/test/CMakeLists.txt index 245c36bcd4..3180c00e0c 100644 --- a/exporters/prometheus/test/CMakeLists.txt +++ b/exporters/prometheus/test/CMakeLists.txt @@ -2,7 +2,8 @@ foreach(testname exporter_test collector_test exporter_utils_test) add_executable(${testname} "${testname}.cc") target_link_libraries( ${testname} ${GTEST_BOTH_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} - opentelemetry_exporter_prometheus prometheus-cpp::pull opentelemetry_resources) + opentelemetry_exporter_prometheus prometheus-cpp::pull + opentelemetry_resources) gtest_add_tests( TARGET ${testname} TEST_PREFIX exporter.