Skip to content

[API] Deprecate opentelemetry::plugin#4021

Merged
marcalff merged 8 commits intoopen-telemetry:mainfrom
marcalff:deprecate_plugin
Apr 23, 2026
Merged

[API] Deprecate opentelemetry::plugin#4021
marcalff merged 8 commits intoopen-telemetry:mainfrom
marcalff:deprecate_plugin

Conversation

@marcalff
Copy link
Copy Markdown
Member

@marcalff marcalff commented Apr 21, 2026

Fixes # (issue)

Changes

Please provide a brief description of the changes here.

  • Deprecated files in API, in the opentelemetry::plugin namespace
    • Added warnings in the files affected, and an error in no-deprecated builds.
  • Updated the DEPRECATED.md documentation
  • Commented out plugin tests and examples from CMake and Bazel
  • Disabled the plugin specific CI

The code is commented out for now, for easier rollback if so required.
File removal, including tests, examples and CI, to be done in the final removal PR.

For significant contributions please make sure you have completed the following items:

  • CHANGELOG.md updated for non-trivial changes
  • Unit tests have been added
  • Changes in public API reviewed

@marcalff marcalff changed the title Deprecate opentelemetry::plugin [API] Deprecate opentelemetry::plugin Apr 21, 2026
@marcalff marcalff marked this pull request as ready for review April 21, 2026 22:04
@marcalff marcalff requested a review from a team as a code owner April 21, 2026 22:04
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 21, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.05%. Comparing base (d63ed0a) to head (a01e279).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #4021      +/-   ##
==========================================
+ Coverage   81.94%   82.05%   +0.12%     
==========================================
  Files         389      385       -4     
  Lines       15927    15891      -36     
==========================================
- Hits        13049    13038      -11     
+ Misses       2878     2853      -25     

see 5 files with indirect coverage changes

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

@ThomsonTan
Copy link
Copy Markdown
Contributor

@lalitb @esigo, could you please take a look? The plugin interface has been there from the very beginning.

Copy link
Copy Markdown
Member

@esigo esigo left a comment

Choose a reason for hiding this comment

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

LGTM
Thanks for the PR :)

Comment thread DEPRECATED.md
@lalitb
Copy link
Copy Markdown
Member

lalitb commented Apr 22, 2026

Thanks, will have a look now.

@lalitb
Copy link
Copy Markdown
Member

lalitb commented Apr 22, 2026

Good to deprecate, but as per the deprecation process, we should be adding this in each public header deprecated:

#ifdef OPENTELEMETRY_NO_DEPRECATED_CODE
#  error "header <opentelemetry/foo.h> is deprecated."
#endif

@marcalff
Copy link
Copy Markdown
Member Author

marcalff commented Apr 23, 2026

Good to deprecate, but as per the deprecation process, we should be adding this in each public header deprecated:

#ifdef OPENTELEMETRY_NO_DEPRECATED_CODE
#  error "header <opentelemetry/foo.h> is deprecated."
#endif

I don't think anyone will see this, it supposes building with OPENTELEMETRY_NO_DEPRECATED_CODE in the first place.

Added warnings in all cases for visibility, as well as the error in no-deprecated builds, for more safety.

Note that I commented out CMake and bazel then, so we don't see this ourselves.

@marcalff marcalff added deprecation Deprecation labels Apr 23, 2026
@lalitb
Copy link
Copy Markdown
Member

lalitb commented Apr 23, 2026

I don't think anyone will see this, it supposes building with OPENTELEMETRY_NO_DEPRECATED_CODE in the first place.

Oh yes, My earlier comment was based on the current docs/deprecation-process.md guidance for deprecated public headers, which explicitly calls for the OPENTELEMETRY_NO_DEPRECATED_CODE error path. So that part was about following the documented process as written.

That said, I agree that the OPENTELEMETRY_NO_DEPRECATED_CODE check alone is only visible in verification builds, so adding warnings in normal builds as well is a better outcome. Keeping warnings for general visibility and the hard error for no-deprecated builds makes sense to me.

I think we should do the follow-up PR to update docs/deprecation-process.md so the documented header deprecation pattern matches what we now consider the preferred implementation.

@marcalff marcalff merged commit 8a97277 into open-telemetry:main Apr 23, 2026
69 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

deprecation Deprecation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants