Skip to content

Commit

Permalink
Merge branch 'main' into otlp_file_exporter
Browse files Browse the repository at this point in the history
  • Loading branch information
owent authored Mar 22, 2024
2 parents be123e1 + f2f0738 commit 0ff8047
Show file tree
Hide file tree
Showing 10 changed files with 36 additions and 25 deletions.
9 changes: 8 additions & 1 deletion .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

22 changes: 11 additions & 11 deletions bazel/repository.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -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",
],
)

Expand All @@ -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",
],
)

Expand Down Expand Up @@ -112,20 +112,20 @@ 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",
],
)

# C++ Prometheus Client library.
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",
],
)

Expand Down
6 changes: 3 additions & 3 deletions ci/do_ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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:"
Expand Down Expand Up @@ -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"

Expand Down Expand Up @@ -502,7 +502,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:"
Expand Down
2 changes: 1 addition & 1 deletion ci/setup_cmake.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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)(\..*)?$"
Expand Down
6 changes: 5 additions & 1 deletion exporters/prometheus/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion third_party/benchmark
Submodule benchmark updated 116 files
2 changes: 1 addition & 1 deletion third_party/googletest
Submodule googletest updated 144 files
2 changes: 1 addition & 1 deletion third_party/nlohmann-json
Submodule nlohmann-json updated 286 files
2 changes: 1 addition & 1 deletion third_party/prometheus-cpp
Submodule prometheus-cpp updated 66 files
+4 −0 .github/renovate.json5
+11 −20 .github/workflows/bazel-ci.yml
+3 −3 .github/workflows/cmake-ci.yml
+3 −8 .github/workflows/linting.yml
+1 −1 3rdparty/civetweb
+4 −3 CMakeLists.txt
+19 −0 MODULE.bazel
+1,851 −0 MODULE.bazel.lock
+6 −7 README.md
+2 −0 WORKSPACE.bzlmod
+8 −6 bazel/civetweb.BUILD
+7 −19 bazel/curl.BUILD
+5 −24 bazel/curl.bzl
+38 −27 bazel/repositories.bzl
+7 −1 bazel/zlib.BUILD
+1 −1 cmake/project-import-cmake/CMakeLists.txt
+2 −2 cmake/project-import-pkgconfig/CMakeLists.txt
+1 −1 core/CMakeLists.txt
+1 −1 core/benchmarks/histogram_bench.cc
+4 −4 core/include/prometheus/client_metric.h
+3 −0 core/include/prometheus/counter.h
+16 −0 core/include/prometheus/detail/future_std.h
+2 −1 core/include/prometheus/family.h
+6 −0 core/include/prometheus/histogram.h
+3 −0 core/include/prometheus/labels.h
+2 −0 core/src/counter.cc
+0 −1 core/src/family.cc
+6 −1 core/src/gauge.cc
+8 −0 core/src/histogram.cc
+11 −17 core/src/registry.cc
+3 −0 core/tests/check_label_name_test.cc
+3 −0 core/tests/check_metric_name_test.cc
+10 −0 core/tests/counter_test.cc
+9 −6 core/tests/family_test.cc
+20 −0 core/tests/histogram_test.cc
+2 −1 core/tests/serializer_test.cc
+2 −1 pull/BUILD.bazel
+2 −3 pull/CMakeLists.txt
+1 −1 pull/src/basic_auth.cc
+5 −14 pull/src/endpoint.cc
+4 −3 pull/src/exposer.cc
+6 −0 pull/src/handler.cc
+0 −1 pull/tests/CMakeLists.txt
+101 −44 pull/tests/integration/integration_test.cc
+0 −14 pull/tests/internal/CMakeLists.txt
+0 −47 pull/tests/internal/base64_test.cc
+14 −0 push/BUILD.bazel
+12 −3 push/CMakeLists.txt
+4 −1 push/include/prometheus/gateway.h
+3 −1 push/src/detail/curl_wrapper.cc
+1 −1 push/src/detail/curl_wrapper.h
+42 −0 push/src/detail/label_encoder.cc
+14 −0 push/src/detail/label_encoder.h
+18 −11 push/src/gateway.cc
+1 −0 push/tests/CMakeLists.txt
+1 −0 push/tests/integration/CMakeLists.txt
+1 −1 push/tests/internal/BUILD.bazel
+14 −0 push/tests/internal/CMakeLists.txt
+43 −0 push/tests/internal/label_encoder_test.cc
+12 −0 util/BUILD.bazel
+25 −0 util/CMakeLists.txt
+54 −3 util/include/prometheus/detail/base64.h
+1 −0 util/tests/CMakeLists.txt
+13 −0 util/tests/unit/BUILD.bazel
+15 −0 util/tests/unit/CMakeLists.txt
+78 −0 util/tests/unit/base64_test.cc
8 changes: 4 additions & 4 deletions third_party_release
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 0ff8047

Please sign in to comment.