diff --git a/.bazelrc b/.bazelrc index 4e87c7c9e0..01a3b4c7bb 100644 --- a/.bazelrc +++ b/.bazelrc @@ -4,9 +4,17 @@ # 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: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 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 +33,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/bazel/repository.bzl b/bazel/repository.bzl index 2abdca87ce..b26479b015 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", ], ) @@ -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", ], ) @@ -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", ], ) @@ -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/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:" 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/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/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/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/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/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 120b53ffab..6824954519 100644 --- a/third_party_release +++ b/third_party_release @@ -15,11 +15,11 @@ gRPC=v1.49.2 abseil=20220623.1 -benchmark=v1.7.1 -googletest=1.13.0 +benchmark=v1.8.3 +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 +prometheus-cpp=v1.2.4 vcpkg=2024.02.14