opentelemetry-cpp-contrib icon indicating copy to clipboard operation
opentelemetry-cpp-contrib copied to clipboard

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

Open dbarker opened this issue 6 months ago • 0 comments

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. https://github.com/open-telemetry/opentelemetry-cpp/compare/main...dbarker:opentelemetry-cpp:poc_otel_cmake_external_repo_support

Posting here for discussion.

dbarker avatar May 14 '25 22:05 dbarker