From 788631d964d2ac3d0fb5180b3dd80917242946bf Mon Sep 17 00:00:00 2001 From: Marc Alff Date: Thu, 21 Mar 2024 18:26:04 +0100 Subject: [PATCH 1/6] Upgrade to googletest 1.14.0 (#2596) --- bazel/repository.bzl | 6 +++--- ci/setup_cmake.sh | 2 +- third_party/googletest | 2 +- third_party_release | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/bazel/repository.bzl b/bazel/repository.bzl index 2abdca87ce..5138e74a35 100644 --- a/bazel/repository.bzl +++ b/bazel/repository.bzl @@ -46,10 +46,10 @@ def opentelemetry_cpp_deps(): maybe( http_archive, name = "com_google_googletest", - sha256 = "ad7fdba11ea011c1d925b3289cf4af2c66a352e18d4c7264392fead75e919363", - strip_prefix = "googletest-1.13.0", + sha256 = "8ad598c73ad796e0d8280b082cebd82a630d73e73cd3c70057938a6501bba5d7", + strip_prefix = "googletest-1.14.0", urls = [ - "https://github.com/google/googletest/archive/v1.13.0.tar.gz", + "https://github.com/google/googletest/archive/v1.14.0.tar.gz", ], ) diff --git a/ci/setup_cmake.sh b/ci/setup_cmake.sh index 0eda07c0ec..a55799cf14 100755 --- a/ci/setup_cmake.sh +++ b/ci/setup_cmake.sh @@ -15,7 +15,7 @@ fi if [ -z "${GOOGLETEST_VERSION}" ]; then # Version by default. Requires C++14. - export GOOGLETEST_VERSION=1.13.0 + export GOOGLETEST_VERSION=1.14.0 fi OLD_GOOGLETEST_VERSION_REGEXP="^1\.([0-9]|10|11|12)(\..*)?$" diff --git a/third_party/googletest b/third_party/googletest index b796f7d446..f8d7d77c06 160000 --- a/third_party/googletest +++ b/third_party/googletest @@ -1 +1 @@ -Subproject commit b796f7d44681514f58a683a3a71ff17c94edb0c1 +Subproject commit f8d7d77c06936315286eb55f8de22cd23c188571 diff --git a/third_party_release b/third_party_release index 120b53ffab..747eb2102e 100644 --- a/third_party_release +++ b/third_party_release @@ -16,7 +16,7 @@ gRPC=v1.49.2 abseil=20220623.1 benchmark=v1.7.1 -googletest=1.13.0 +googletest=1.14.0 ms-gsl=v3.1.0-67-g6f45293 nlohmann-json=v3.11.2 opentelemetry-proto=v1.1.0 From 0375cd40515701b1285a15c46579654fc83c0181 Mon Sep 17 00:00:00 2001 From: Marc Alff Date: Thu, 21 Mar 2024 19:07:07 +0100 Subject: [PATCH 2/6] Upgrade to nlohmann_json 3.11.3 (#2595) --- bazel/repository.bzl | 4 ++-- third_party/nlohmann-json | 2 +- third_party_release | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bazel/repository.bzl b/bazel/repository.bzl index 5138e74a35..020730b2a5 100644 --- a/bazel/repository.bzl +++ b/bazel/repository.bzl @@ -112,9 +112,9 @@ def opentelemetry_cpp_deps(): http_archive, name = "github_nlohmann_json", build_file = "@io_opentelemetry_cpp//bazel:nlohmann_json.BUILD", - sha256 = "e5c7a9f49a16814be27e4ed0ee900ecd0092bfb7dbfca65b5a421b774dccaaed", + sha256 = "a22461d13119ac5c78f205d3df1db13403e58ce1bb1794edc9313677313f4a9d", urls = [ - "https://github.com/nlohmann/json/releases/download/v3.11.2/include.zip", + "https://github.com/nlohmann/json/releases/download/v3.11.3/include.zip", ], ) diff --git a/third_party/nlohmann-json b/third_party/nlohmann-json index bc889afb4c..9cca280a4d 160000 --- a/third_party/nlohmann-json +++ b/third_party/nlohmann-json @@ -1 +1 @@ -Subproject commit bc889afb4c5bf1c0d8ee29ef35eaaf4c8bef8a5d +Subproject commit 9cca280a4d0ccf0c08f47a99aa71d1b0e52f8d03 diff --git a/third_party_release b/third_party_release index 747eb2102e..80b86f5bfa 100644 --- a/third_party_release +++ b/third_party_release @@ -18,7 +18,7 @@ abseil=20220623.1 benchmark=v1.7.1 googletest=1.14.0 ms-gsl=v3.1.0-67-g6f45293 -nlohmann-json=v3.11.2 +nlohmann-json=v3.11.3 opentelemetry-proto=v1.1.0 opentracing-cpp=v1.6.0 prometheus-cpp=v1.1.0 From 3f8d95446843d6b456b51207036a693349c5d6cc Mon Sep 17 00:00:00 2001 From: Keith Smiley Date: Thu, 21 Mar 2024 12:33:11 -0700 Subject: [PATCH 3/6] [bazel] Move -std=c++14 to .bazelrc (#2600) This way it applies to local builds as well as CI builds --- .bazelrc | 4 +++- ci/do_ci.sh | 6 +++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.bazelrc b/.bazelrc index 4e87c7c9e0..5f9e1c0ad5 100644 --- a/.bazelrc +++ b/.bazelrc @@ -7,6 +7,9 @@ # Needed by gRPC to build on some platforms. build --copt -DGRPC_BAZEL_BUILD +# Set minimum supported C++ version +build --host_cxxopt=-std=c++14 --cxxopt=-std=c++14 + # --config=asan : Address Sanitizer. common:asan --copt -DADDRESS_SANITIZER common:asan --copt -fsanitize=address,bool,float-cast-overflow,integer-divide-by-zero,null,return,returns-nonnull-attribute,shift-exponent,signed-integer-overflow,unreachable,vla-bound @@ -25,4 +28,3 @@ common:tsan --cc_output_directory_tag=tsan # This is needed to address false positive problem with abseil.The same setting as gRPC # https://github.com/google/sanitizers/issues/953 common:tsan --test_env=TSAN_OPTIONS=report_atomic_races=0 - diff --git a/ci/do_ci.sh b/ci/do_ci.sh index 9ea7ac6bc3..3da87e587d 100755 --- a/ci/do_ci.sh +++ b/ci/do_ci.sh @@ -25,7 +25,7 @@ function run_benchmarks [ -z "${BENCHMARK_DIR}" ] && export BENCHMARK_DIR=$HOME/benchmark mkdir -p $BENCHMARK_DIR - bazel $BAZEL_STARTUP_OPTIONS build --host_cxxopt=-std=c++14 --cxxopt=-std=c++14 $BAZEL_OPTIONS_ASYNC -c opt -- \ + bazel $BAZEL_STARTUP_OPTIONS build $BAZEL_OPTIONS_ASYNC -c opt -- \ $(bazel query 'attr("tags", "benchmark_result", ...)') echo "" echo "Benchmark results in $BENCHMARK_DIR:" @@ -70,7 +70,7 @@ echo "make command: ${MAKE_COMMAND}" echo "IWYU option: ${IWYU}" BAZEL_OPTIONS_DEFAULT="--copt=-DENABLE_METRICS_EXEMPLAR_PREVIEW" -BAZEL_OPTIONS="--cxxopt=-std=c++14 $BAZEL_OPTIONS_DEFAULT" +BAZEL_OPTIONS="$BAZEL_OPTIONS_DEFAULT" BAZEL_TEST_OPTIONS="$BAZEL_OPTIONS --test_output=errors" @@ -493,7 +493,7 @@ elif [[ "$1" == "bazel.e2e" ]]; then exit 0 elif [[ "$1" == "benchmark" ]]; then [ -z "${BENCHMARK_DIR}" ] && export BENCHMARK_DIR=$HOME/benchmark - bazel $BAZEL_STARTUP_OPTIONS build --host_cxxopt=-std=c++14 --cxxopt=-std=c++14 $BAZEL_OPTIONS_ASYNC -c opt -- \ + bazel $BAZEL_STARTUP_OPTIONS build $BAZEL_OPTIONS_ASYNC -c opt -- \ $(bazel query 'attr("tags", "benchmark_result", ...)') echo "" echo "Benchmark results in $BENCHMARK_DIR:" From 8605fe82c18c230422c552c6f7044b20c61fa279 Mon Sep 17 00:00:00 2001 From: Keith Smiley Date: Thu, 21 Mar 2024 16:59:29 -0700 Subject: [PATCH 4/6] [bazel] Fix -std=c++14 warning on Windows (#2601) --- .bazelrc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.bazelrc b/.bazelrc index 5f9e1c0ad5..01a3b4c7bb 100644 --- a/.bazelrc +++ b/.bazelrc @@ -4,11 +4,16 @@ # bazel configurations for running tests under sanitizers. # Based on https://github.com/bazelment/trunk/blob/master/tools/bazel.rc +# Enable automatic configs based on platform +common --enable_platform_specific_config + # Needed by gRPC to build on some platforms. build --copt -DGRPC_BAZEL_BUILD # Set minimum supported C++ version -build --host_cxxopt=-std=c++14 --cxxopt=-std=c++14 +build:macos --host_cxxopt=-std=c++14 --cxxopt=-std=c++14 +build:linux --host_cxxopt=-std=c++14 --cxxopt=-std=c++14 +build:windows --host_cxxopt=/std:c++14 --cxxopt=/std:c++14 # --config=asan : Address Sanitizer. common:asan --copt -DADDRESS_SANITIZER From d24839e318955e9420ed447917d1859b6fa122dd Mon Sep 17 00:00:00 2001 From: Marc Alff Date: Fri, 22 Mar 2024 04:08:15 +0100 Subject: [PATCH 5/6] Upgrade to benchmark 1.8.3 (#2597) --- bazel/repository.bzl | 6 +++--- third_party/benchmark | 2 +- third_party_release | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/bazel/repository.bzl b/bazel/repository.bzl index 020730b2a5..a4c3d27b5f 100644 --- a/bazel/repository.bzl +++ b/bazel/repository.bzl @@ -34,10 +34,10 @@ def opentelemetry_cpp_deps(): maybe( http_archive, name = "com_github_google_benchmark", - sha256 = "6430e4092653380d9dc4ccb45a1e2dc9259d581f4866dc0759713126056bc1d7", - strip_prefix = "benchmark-1.7.1", + sha256 = "6bc180a57d23d4d9515519f92b0c83d61b05b5bab188961f36ac7b06b0d9e9ce", + strip_prefix = "benchmark-1.8.3", urls = [ - "https://github.com/google/benchmark/archive/v1.7.1.tar.gz", + "https://github.com/google/benchmark/archive/v1.8.3.tar.gz", ], ) diff --git a/third_party/benchmark b/third_party/benchmark index d572f47773..344117638c 160000 --- a/third_party/benchmark +++ b/third_party/benchmark @@ -1 +1 @@ -Subproject commit d572f4777349d43653b21d6c2fc63020ab326db2 +Subproject commit 344117638c8ff7e239044fd0fa7085839fc03021 diff --git a/third_party_release b/third_party_release index 80b86f5bfa..a34dbc457f 100644 --- a/third_party_release +++ b/third_party_release @@ -15,7 +15,7 @@ gRPC=v1.49.2 abseil=20220623.1 -benchmark=v1.7.1 +benchmark=v1.8.3 googletest=1.14.0 ms-gsl=v3.1.0-67-g6f45293 nlohmann-json=v3.11.3 From f2f07387921562aa37c4dd0d658b23e20492fbb8 Mon Sep 17 00:00:00 2001 From: Marc Alff Date: Fri, 22 Mar 2024 05:17:02 +0100 Subject: [PATCH 6/6] Upgrade to prometheus 1.2.4 (#2598) --- bazel/repository.bzl | 6 +++--- exporters/prometheus/CMakeLists.txt | 6 +++++- third_party/prometheus-cpp | 2 +- third_party_release | 2 +- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/bazel/repository.bzl b/bazel/repository.bzl index a4c3d27b5f..b26479b015 100644 --- a/bazel/repository.bzl +++ b/bazel/repository.bzl @@ -122,10 +122,10 @@ def opentelemetry_cpp_deps(): maybe( http_archive, name = "com_github_jupp0r_prometheus_cpp", - sha256 = "397544fe91e183029120b4eebcfab24ed9ec833d15850aae78fd5db19062d13a", - strip_prefix = "prometheus-cpp-1.1.0", + sha256 = "48dbad454d314b836cc667ec4def93ec4a6e4255fc8387c20cacb3b8b6faee30", + strip_prefix = "prometheus-cpp-1.2.4", urls = [ - "https://github.com/jupp0r/prometheus-cpp/archive/refs/tags/v1.1.0.tar.gz", + "https://github.com/jupp0r/prometheus-cpp/archive/refs/tags/v1.2.4.tar.gz", ], ) diff --git a/exporters/prometheus/CMakeLists.txt b/exporters/prometheus/CMakeLists.txt index c6387a66c8..1d66d59560 100644 --- a/exporters/prometheus/CMakeLists.txt +++ b/exporters/prometheus/CMakeLists.txt @@ -27,9 +27,13 @@ endif() if(TARGET core) list(APPEND PROMETHEUS_EXPORTER_TARGETS core) endif() +if(TARGET util) + list(APPEND PROMETHEUS_EXPORTER_TARGETS util) +endif() target_link_libraries( opentelemetry_exporter_prometheus - PUBLIC opentelemetry_metrics prometheus-cpp::pull prometheus-cpp::core) + PUBLIC opentelemetry_metrics prometheus-cpp::pull prometheus-cpp::core + prometheus-cpp::util) if(OPENTELEMETRY_INSTALL) install( diff --git a/third_party/prometheus-cpp b/third_party/prometheus-cpp index c9ffcdda90..ad99e21f47 160000 --- a/third_party/prometheus-cpp +++ b/third_party/prometheus-cpp @@ -1 +1 @@ -Subproject commit c9ffcdda9086ffd9e1283ea7a0276d831f3c8a8d +Subproject commit ad99e21f4706193670c42b36c9824dc997f4c475 diff --git a/third_party_release b/third_party_release index a34dbc457f..6824954519 100644 --- a/third_party_release +++ b/third_party_release @@ -21,5 +21,5 @@ ms-gsl=v3.1.0-67-g6f45293 nlohmann-json=v3.11.3 opentelemetry-proto=v1.1.0 opentracing-cpp=v1.6.0 -prometheus-cpp=v1.1.0 +prometheus-cpp=v1.2.4 vcpkg=2024.02.14