Skip to content

feat(opentelemetry): support OpenTelemetry v1.28.0 - #16453

Open
colinmoy wants to merge 3 commits into
googleapis:mainfrom
colinmoy:feat-opentelemetry-1-28-0
Open

colinmoy wants to merge 3 commits into
googleapis:mainfrom
colinmoy:feat-opentelemetry-1-28-0

Conversation

@colinmoy

Copy link
Copy Markdown
Collaborator

No description provided.

@colinmoy
colinmoy requested a review from a team as a code owner September 15, 2026 18:19

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request upgrades the opentelemetry-cpp dependency to version 1.28.0 across Bazel configurations, Dockerfiles, and documentation. However, the review identified a major regression where a large portion of doc/packaging.md (including the introduction, macOS instructions, and footnotes) was accidentally deleted. Additionally, the changes in grpc_opentelemetry.cc and its test file introduce commented-out code as inline annotations; these should be replaced with clean, raw string literals, and sc::rpc::kRpcMethod should be updated to "rpc.method" for consistency.

Comment thread doc/packaging.md
Comment thread google/cloud/internal/grpc_opentelemetry.cc Outdated
Comment thread google/cloud/internal/grpc_opentelemetry_test.cc Outdated

@dbolduc dbolduc left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we lost some of doc/packaging.md, but otherwise LG

Comment thread doc/packaging.md
@@ -1,140 +1,3 @@
# Packaging `google-cloud-cpp`

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

restore this?

Comment thread doc/packaging.md

</details>

<!-- inject-distro-instructions-end -->

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and this.

@scotthart

Copy link
Copy Markdown
Member

Other than the dockerfiles I called out to update to v1.28.0, let's revert the others to their current values.

@codecov

codecov Bot commented Sep 15, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.31%. Comparing base (4955812) to head (c1e44e4).

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #16453      +/-   ##
==========================================
+ Coverage   92.29%   92.31%   +0.01%     
==========================================
  Files        2246     2246              
  Lines      213751   213751              
==========================================
+ Hits       197290   197326      +36     
+ Misses      16461    16425      -36     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@scotthart

Copy link
Copy Markdown
Member

Looks like the new version of otel changed a parameter from pass by value, to pass by const ref.

Removed Symbols  1 

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
recordable.h
namespace opentelemetry::v1::sdk::trace
Recordable::AddLink ( opentelemetry::v1::trace::SpanContext p1 )
_ZN13opentelemetry2v13sdk5trace10Recordable7AddLinkENS0_5trace11SpanContextE


to the top

Problems with Symbols, Medium Severity  1 

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
recordable.h
namespace opentelemetry::v1::sdk::trace
[+] Recordable::AddLink ( opentelemetry::v1::trace::SpanContext p1 )  1 
⇣
Recordable::AddLink ( opentelemetry::v1::trace::SpanContext const& p1 )
_ZN13opentelemetry2v13sdk5trace10Recordable7AddLinkENS0_5trace11SpanContextE

              Change                                 Effect
1 Parameters list has been        Recompilation of a client program may be
  changed.                        broken.

While technically breaking, this should be compatible. Update the abi dump for our google_cloud_cpp_opentelemetry library and the check should pass.

Comment thread MODULE.bazel Outdated
bazel_dep(name = "platforms", version = "1.1.0")
bazel_dep(name = "bazel_skylib", version = "1.9.2")
bazel_dep(name = "rules_cc", version = "0.2.17")
bazel_dep(name = "rules_cc", version = "0.2.22")

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should make this change in a separate PR. I think renovate-bot may already have one in flight.

Comment thread MODULE.bazel Outdated
bazel_dep(name = "nlohmann_json", version = "3.12.0.bcr.1")
bazel_dep(name = "curl", version = "8.8.0.bcr.3")
bazel_dep(name = "opentelemetry-cpp", version = "1.24.0")
single_version_override(

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems redundant.

Comment thread MODULE.bazel Outdated
module_name = "curl",
version = "8.8.0.bcr.3",
)
bazel_dep(name = "opentelemetry-cpp", version = "1.28.0")

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As this file specifies recommended minimum versions, let's keep it a 1.24.0.


WORKDIR /var/tmp/build/
RUN curl -fsSL https://github.com/open-telemetry/opentelemetry-cpp/archive/v1.24.0.tar.gz | \
RUN curl -fsSL https://github.com/open-telemetry/opentelemetry-cpp/archive/v1.28.0.tar.gz | \

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's keep this at v1.28.0 since our clang-tidy builds use it.


WORKDIR /var/tmp/build/
RUN curl -fsSL https://github.com/open-telemetry/opentelemetry-cpp/archive/v1.24.0.tar.gz | \
RUN curl -fsSL https://github.com/open-telemetry/opentelemetry-cpp/archive/v1.28.0.tar.gz | \

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's keep this one also at 1.28.0 to sniff out any C++20 issues.

Comment thread bazel/workspace0.bzl Outdated
name = "opentelemetry-cpp",
urls = [
"https://github.com/open-telemetry/opentelemetry-cpp/archive/v1.20.0.tar.gz",
"https://github.com/open-telemetry/opentelemetry-cpp/archive/v1.28.0.tar.gz",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's revert this to 1.20.0 to make sure we work with the old semantic conventions and because our bazel oldest builds uses WORKSPACE files.

Comment thread google/cloud/internal/grpc_opentelemetry.cc Outdated
Comment thread google/cloud/internal/grpc_opentelemetry_test.cc Outdated
{{sc::rpc::kRpcSystem, sc::rpc::RpcSystemValues::kGrpc},
{sc::rpc::kRpcService, service},
{sc::rpc::kRpcMethod, method},
{{"rpc.system", sc::rpc::RpcSystemValues::kGrpc},

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Revert these changes. Going from a strongly typed enums to a string literals is backwards. It turns a potential compilation error in to a runtime error.

SpanNamed("google.cloud.foo.v1.Foo/GetBar"),
SpanHasAttributes(
OTelAttribute<std::string>(sc::rpc::kRpcSystem,
OTelAttribute<std::string>("rpc.system",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Revert these changes. Going from a strongly typed enums to a string literals is backwards. It turns a potential compilation error in to a runtime error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants