Skip to content

POC: Possible implementation of opentelemetry-cpp-contrib cmake project with components #550

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

dbarker
Copy link

@dbarker dbarker commented May 14, 2025

This is a proof of concept for adding a top level CMakeLists.txt file to this repo in order to create a versioned opentelemetry-cpp-contrib package with components.

Goals:

  1. Support building a separate versioned opentelemetry-cpp-contrib package that depends on opentelmetry-cpp
  2. Support two options for the opentelemetry-cpp dependency:
    • Option 1: Use find_package to import an installed opentelemetry-cpp package
    • Option 2: Fetch opentelemetry-cpp from the git repo (or git submodule) and build it together with opentelemetry-cpp-contrib in a single build tree
  3. Enable creating independent components for install and import with their own third party dependencies
    • Finding like so: find_package(opentelemetry-cpp-contrib COMPONENTS exporters_geneva_metrics)

This requires some minor changes to the opentelemetry-cpp cmake install functions for general use included in this branch.
open-telemetry/opentelemetry-cpp@main...dbarker:opentelemetry-cpp:poc_otel_cmake_external_repo_support

Posting here for discussion.

@dbarker dbarker added the pr:do-not-merge This pr is not ready to be merged label May 14, 2025
…rib specific config.cmake template. Simplify component cmake and remove the MAIN_PROJECT conditionals
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr:do-not-merge This pr is not ready to be merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant