镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

impl(opentelemetry): replace deprecated semantic convention symbols - #16533

Merged
scotthart merged 3 commits into
googleapis:mainfrom
scotthart:otel_deprecated_sem_conv_rpc
Oct 7, 2026
Merged

scotthart merged 3 commits into
googleapis:mainfrom
scotthart:otel_deprecated_sem_conv_rpc

Conversation

@scotthart

@scotthart scotthart commented Oct 2, 2026 •

Copy link
Copy Markdown
Member

Apparently, semantic conventions come and go across versions of opentelemetry-cpp. In order to avoid deprecated warnings and proliferation of string literals where defined constants exist, this PR introduces a single header file that manages compatibility of these semantic convention symbols. This PR also updates existing usages of string literals to the corresponding constant.

@scotthart
scotthart requested a review from a team as a code owner October 2, 2026 21:46

@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 updates the gRPC OpenTelemetry span creation to conform to OpenTelemetry RPC semantic conventions by using the fully-qualified logical name for rpc.method, deprecating rpc.service, and transitioning from rpc.system to rpc.system.name. The accompanying unit tests have been updated accordingly. Feedback on the changes suggests replacing the use of auto with an explicit std::string type for the fully_qualified_method variable to comply with the repository's style guide regarding type deduction.

@colinmoy colinmoy left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The CI is failing because the new kRpcSystemName constants don't exist in the older opentelemetry-cpp versions in our test matrix. Please use #if macros to maintain backward compatibility

@scotthart

Copy link
Copy Markdown
Member Author

Created #16544 to track removal of deprecated constants that have no replacement.

@codecov

codecov Bot commented Oct 7, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.35%. Comparing base (6f82ebc) to head (1127a0c).
⚠️ Report is 9 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #16533      +/-   ##
==========================================
- Coverage   92.36%   92.35%   -0.01%     
==========================================
  Files        2262     2262              
  Lines      217027   217026       -1     
==========================================
- Hits       200448   200436      -12     
- Misses      16579    16590      +11     

☔ 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
scotthart merged commit 2a547a6 into googleapis:main Oct 7, 2026
71 checks passed

This branch was previously deployed

1 inactive deployment
false — 1127a0c5 Deployed Oct 7, 2026 by scotthart via Save PR ref #12312
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.

2 participants