Skip to content

Commit

Permalink
[Dep] Updated opentelemetry-cpp to 1.18.0 (grpc#38317)
Browse files Browse the repository at this point in the history
- Updated opentelemetry-cpp to 1.18.0 (now it's a released one)
- Clean up the old `com_github_jupp0r_prometheus_cpp` dep

Closes grpc#38317

PiperOrigin-RevId: 707689177
  • Loading branch information
veblush authored and copybara-github committed Dec 18, 2024
1 parent 1d49120 commit 4a72b88
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 28 deletions.
27 changes: 5 additions & 22 deletions bazel/grpc_deps.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -320,32 +320,15 @@ def grpc_deps():
],
)

# TODO(stanleycheung): remove this when prometheus-cpp AND
# opentelemetry-cpp cut a new release
# This override is needed because this fix
# https://github.com/jupp0r/prometheus-cpp/pull/626
# has not been included in the latest prometheus-cpp release yet.
# We also need opentelemetry-cpp to update their dependency on
# prometheus-cpp after that fix is released.
# Without the fix, we cannot build the prometheus exporter with bazel 6
if "com_github_jupp0r_prometheus_cpp" not in native.existing_rules():
http_archive(
name = "com_github_jupp0r_prometheus_cpp",
sha256 = "cdf03ee63fcb1d9e113f7bd525e043c254729dddf19d80396489f5b92c83c18d",
strip_prefix = "prometheus-cpp-b1234816facfdda29845c46696a02998a4af115a",
urls = [
"https://github.com/jupp0r/prometheus-cpp/archive/b123481.zip",
],
)

if "io_opentelemetry_cpp" not in native.existing_rules():
http_archive(
name = "io_opentelemetry_cpp",
sha256 = "4b822a2f137b8c2ea403c5ec9a661addcc048aa8ba3afebffd58cbcf218457bc",
strip_prefix = "opentelemetry-cpp-a388e87d72b8321c189c8d41edb746ffa687ce3c",
sha256 = "fb7c38e82ce5a5dcad70be7eafe0d3d4f439e3ef822b414a99db7514580ddac4",
strip_prefix = "opentelemetry-cpp-955a807c0461544560429c2414b8967f6023e590",
urls = [
"https://storage.googleapis.com/grpc-bazel-mirror/github.com/open-telemetry/opentelemetry-cpp/archive/a388e87d72b8321c189c8d41edb746ffa687ce3c.tar.gz",
"https://github.com/open-telemetry/opentelemetry-cpp/archive/a388e87d72b8321c189c8d41edb746ffa687ce3c.tar.gz",
# v1.18.0
"https://storage.googleapis.com/grpc-bazel-mirror/github.com/open-telemetry/opentelemetry-cpp/archive/955a807c0461544560429c2414b8967f6023e590.tar.gz",
"https://github.com/open-telemetry/opentelemetry-cpp/archive/955a807c0461544560429c2414b8967f6023e590.tar.gz",
],
)

Expand Down
2 changes: 1 addition & 1 deletion third_party/opentelemetry-cpp
Submodule opentelemetry-cpp updated 60 files
+3 −0 .bazelrc
+2 −2 .github/workflows/ci.yml
+62 −0 .github/workflows/cppcheck.yml
+129 −3 CHANGELOG.md
+2 −12 CMakeLists.txt
+2 −2 MODULE.bazel
+2 −2 api/include/opentelemetry/nostd/internal/absl/README.md
+15 −28 api/include/opentelemetry/nostd/internal/absl/base/config.h
+5 −5 api/include/opentelemetry/nostd/internal/absl/base/internal/inline_variable.h
+5 −5 api/include/opentelemetry/nostd/internal/absl/base/internal/invoke.h
+4 −4 api/include/opentelemetry/nostd/internal/absl/base/macros.h
+16 −34 api/include/opentelemetry/nostd/internal/absl/base/options.h
+14 −14 api/include/opentelemetry/nostd/internal/absl/meta/type_traits.h
+7 −7 api/include/opentelemetry/nostd/internal/absl/types/bad_variant_access.h
+129 −129 api/include/opentelemetry/nostd/internal/absl/types/internal/variant.h
+111 −111 api/include/opentelemetry/nostd/internal/absl/types/variant.h
+34 −34 api/include/opentelemetry/nostd/internal/absl/utility/utility.h
+10 −1 api/include/opentelemetry/nostd/variant.h
+2 −2 api/include/opentelemetry/version.h
+3 −3 bazel/repository.bzl
+8 −1 cmake/opentelemetry-cpp-config.cmake.in
+31 −37 cmake/opentelemetry-proto.cmake
+1 −1 cmake/patch-imported-config.cmake
+1 −1 docs/public/conf.py
+1 −1 examples/grpc/CMakeLists.txt
+69 −23 exporters/elasticsearch/test/es_log_record_exporter_test.cc
+2 −0 exporters/otlp/BUILD
+5 −3 exporters/otlp/CMakeLists.txt
+42 −13 exporters/otlp/include/opentelemetry/exporters/otlp/otlp_grpc_client.h
+36 −0 exporters/otlp/include/opentelemetry/exporters/otlp/otlp_grpc_client_factory.h
+37 −3 exporters/otlp/include/opentelemetry/exporters/otlp/otlp_grpc_exporter.h
+10 −0 exporters/otlp/include/opentelemetry/exporters/otlp/otlp_grpc_exporter_factory.h
+38 −5 exporters/otlp/include/opentelemetry/exporters/otlp/otlp_grpc_log_record_exporter.h
+11 −1 exporters/otlp/include/opentelemetry/exporters/otlp/otlp_grpc_log_record_exporter_factory.h
+37 −5 exporters/otlp/include/opentelemetry/exporters/otlp/otlp_grpc_metric_exporter.h
+11 −1 exporters/otlp/include/opentelemetry/exporters/otlp/otlp_grpc_metric_exporter_factory.h
+137 −24 exporters/otlp/src/otlp_grpc_client.cc
+27 −0 exporters/otlp/src/otlp_grpc_client_factory.cc
+81 −27 exporters/otlp/src/otlp_grpc_exporter.cc
+9 −0 exporters/otlp/src/otlp_grpc_exporter_factory.cc
+84 −29 exporters/otlp/src/otlp_grpc_log_record_exporter.cc
+9 −0 exporters/otlp/src/otlp_grpc_log_record_exporter_factory.cc
+83 −27 exporters/otlp/src/otlp_grpc_metric_exporter.cc
+9 −0 exporters/otlp/src/otlp_grpc_metric_exporter_factory.cc
+22 −0 exporters/otlp/test/otlp_grpc_exporter_factory_test.cc
+24 −0 exporters/otlp/test/otlp_grpc_log_record_exporter_factory_test.cc
+132 −0 exporters/otlp/test/otlp_grpc_log_record_exporter_test.cc
+24 −0 exporters/otlp/test/otlp_grpc_metric_exporter_factory_test.cc
+41 −38 ext/include/opentelemetry/ext/http/common/url_parser.h
+118 −229 ext/test/http/url_parser_test.cc
+3 −3 sdk/include/opentelemetry/sdk/common/empty_attributes.h
+1 −1 sdk/include/opentelemetry/sdk/trace/span_data.h
+1 −1 sdk/include/opentelemetry/sdk/version/version.h
+1 −1 sdk/src/common/CMakeLists.txt
+0 −1 sdk/src/logs/BUILD
+0 −1 sdk/src/metrics/BUILD
+0 −1 sdk/src/resource/BUILD
+4 −4 sdk/src/version/version.cc
+1 −1 third_party/opentelemetry-proto
+1 −1 third_party_release
8 changes: 4 additions & 4 deletions tools/run_tests/sanity/check_bazel_workspace.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,6 @@
"com_google_fuzztest",
"io_opencensus_cpp",
"io_opentelemetry_cpp",
# TODO(stanleycheung): remove when prometheus-cpp has new release
"com_github_jupp0r_prometheus_cpp",
"envoy_api",
_BAZEL_SKYLIB_DEP_NAME,
_BAZEL_TOOLCHAINS_DEP_NAME,
Expand Down Expand Up @@ -91,8 +89,6 @@
"com_google_absl",
"com_google_fuzztest",
"io_opencensus_cpp",
# TODO(stanleycheung): remove when prometheus-cpp has new release
"com_github_jupp0r_prometheus_cpp",
_BAZEL_SKYLIB_DEP_NAME,
_BAZEL_TOOLCHAINS_DEP_NAME,
_BAZEL_COMPDB_DEP_NAME,
Expand Down Expand Up @@ -191,6 +187,10 @@ def grpc_python_deps(self):
for dep_name in _GRPC_BAZEL_ONLY_DEPS:
names_without_bazel_only_deps.remove(dep_name)
archive_urls = [names_and_urls[name] for name in names_without_bazel_only_deps]
for url in archive_urls:
if re.search(git_hash_pattern, url) is None:
print("Cannot find the hash value from url", url)
sys.exit(1)
workspace_git_hashes = {
re.search(git_hash_pattern, url).group() for url in archive_urls
}
Expand Down
2 changes: 1 addition & 1 deletion tools/run_tests/sanity/check_submodules.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ third_party/googleapis fe8ba054ad4f7eca946c2d14a63c3f07c0b586a0
third_party/googletest 2dd1c131950043a8ad5ab0d2dda0e0970596586a
third_party/opencensus-proto 4aa53e15cbf1a47bc9087e6cfdca214c1eea4e89
third_party/opentelemetry 60fa8754d890b5c55949a8c68dcfd7ab5c2395df
third_party/opentelemetry-cpp a388e87d72b8321c189c8d41edb746ffa687ce3c
third_party/opentelemetry-cpp 955a807c0461544560429c2414b8967f6023e590
third_party/protobuf 2d4414f384dc499af113b5991ce3eaa9df6dd931
third_party/protoc-gen-validate 32c2415389a3538082507ae537e7edd9578c64ed
third_party/re2 0c5616df9c0aaa44c9440d87422012423d91c7d1
Expand Down

0 comments on commit 4a72b88

Please sign in to comment.