Skip to content

[CONFIGURATION] deprecate builder cmake components - #4428

Merged
marcalff merged 4 commits into
open-telemetry:mainfrom
dbarker:cmake_deprecate_builder_components
Aug 15, 2026
Merged

[CONFIGURATION] deprecate builder cmake components#4428
marcalff merged 4 commits into
open-telemetry:mainfrom
dbarker:cmake_deprecate_builder_components

Conversation

@dbarker

@dbarker dbarker commented Aug 14, 2026

Copy link
Copy Markdown
Member

Fixes # (issue)

The core configuration libraries with the builder interfaces are now installed unconditionally with the SDK. The exporter builder targets have their own CMake component but do not bring in any external dependencies.

This PR merges the separate builder components into the exporter component they are associated with. The CMake targets for the exporters and builders installed as a single CMake component. This makes it a bit easier for users (if CMake finds the exporter component it imports the exporter target and the builder target).

The following CMake components are deprecated and merged:

  • exporters_ostream_builder merged into exporters_ostream
  • exporters_otlp_builder_utils merged into exporters_otlp_common
  • exporters_otlp_file_builder merged into exporters_otlp_file
  • exporters_otlp_grpc_builder merged into exporters_otlp_grpc
  • exporters_otlp_http_builder merged into exporters_otlp_http
  • exporters_prometheus_builder merged into exporters_prometheus
# Prior to this PR a user needed to explicitly import the builder component to use it in declarative configuration
find_package(opentelemetry-cpp CONFIG REQUIRED COMPONENTS exporters_otlp_grpc exporters_otlp_grpc_builder)

# With this PR a user just needs to import the exporter component they want and the builder comes with it. 
find_package(opentelemetry-cpp CONFIG REQUIRED COMPONENTS exporters_otlp_grpc)

Changes

  • Deprecate the separate CMake components for config builders. Calling find_package on the deprecated components will resolve to the associated exporter component with a deprecation message.
  • Merge the CMake targets and install tests of the deprecated components into their associated components.
  • New install test to validate calling find_package on the deprecated components

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

@codecov

codecov Bot commented Aug 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.59%. Comparing base (85308a2) to head (7f2d1d5).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #4428   +/-   ##
=======================================
  Coverage   82.59%   82.59%           
=======================================
  Files         511      511           
  Lines       20039    20039           
=======================================
  Hits        16550    16550           
  Misses       3489     3489           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@dbarker
dbarker marked this pull request as ready for review August 14, 2026 13:00
@dbarker
dbarker requested a review from a team as a code owner August 14, 2026 13:00

@marcalff marcalff 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.

LGTM.

The original motivation for separate libraries was due to the dependency on yaml.

Now that the core configuration code is maintream and separated from yaml, this simplification makes sense.

@marcalff
marcalff merged commit 895f49f into open-telemetry:main Aug 15, 2026
73 checks passed
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