Skip to content
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

Binary releases and package management #2682

Open
svrnm opened this issue May 24, 2024 · 11 comments
Open

Binary releases and package management #2682

svrnm opened this issue May 24, 2024 · 11 comments
Labels
enhancement New feature or request Stale triage/accepted Indicates an issue or PR is ready to be actively worked on.

Comments

@svrnm
Copy link
Member

svrnm commented May 24, 2024

Is your feature request related to a problem?

When I want to use OpenTelemetry C++ I currently have 2 options to do so:

  1. I build the code myself from the sources
  2. I use an "unofficial", maybe not stable package if it is available for my environment (see below)

For most users only option (1) is available and it's a huge entry barrier for people to get started with OpenTelemtry C++. A good example on the level of complexity is the Getting Started, which asks a lot of steps that need to be accomplished to get an app up and running.

Describe the solution you'd like

We discussed this during one of the last SIG meetings and this is a follow up issue on that: to make it easier for end-users to get started with OpenTelemetry C++ there are two options to address that:

  1. Provide binary releases for major platforms (OS + arch), similar to the releases the collector provides (see https://github.com/open-telemetry/opentelemetry-collector-releases/releases)
  2. Add support for common package managers (rpm, deb, ebuild, apk, homebrew), or if available already, collaborate with the maintainers of those packages to provide first-level support.

Both options are not mutually exclusive, indeed by providing binary releases some publications for package managers are easier as well (except they require reproducable builds).

I suggest the following steps:

Describe alternatives you've considered

Do nothing.

Additional context

Addressing this issue does not require deep understanding of C++ but knowledge around releasing and publishing open source packages. Therefore I suggest this issue gets tagged with "help wanted".

Existing packages from 3rd parties:

@github-actions github-actions bot added the needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. label May 24, 2024
@marcalff
Copy link
Member

Thanks for putting this together.

There is also:

In summary, the landscape is a wild zoo of unmaintained and obsolete ports, which increases confusion, and raises the barrier of entry even more with outdated (and most likely broken) packages.

@marcalff marcalff added triage/accepted Indicates an issue or PR is ready to be actively worked on. enhancement New feature or request and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels May 29, 2024
@svrnm
Copy link
Member Author

svrnm commented Jun 3, 2024

Thanks for completing that list @marcalff

I am wondering, are there other C++ based projects we can learn from? How are some of them managing that? Or how do they make it easy for package providers to stay up-to-date and provide consistent solutions?

@svrnm
Copy link
Member Author

svrnm commented Jun 12, 2024

So, I thought about this a little bit more, I think the easiest thing to begin with are the binary builds. I am wondering if the existing CI pipeline (or benchmark?) could be the foundation for that?

@malkia
Copy link

malkia commented Jun 12, 2024

I fear the build matrix would be rather large, and have to be somewhat opinionated.

For example OPENTELEMETRY_ABI_VERSION_NO can take two versions, then static / dynamic, then what components are added by default (and their dependencies).

Lastly how these dependencies are pulled, for example when building .dll/.so/.dylib - are these dependencies also .dll/.so/.dylib, or are they bundled and hidden in the dynamic(shared) library itself.

Would I get debug builds, and debug builds with different .dll names so I can place both .dll in the same "bin" folder (typical gamedev setup would be like this for us).

I feel best of the buck would be dynamic library distribution, as precompiled .lib files go only so far.

Oh, and also what flavor of C++ runtime and ABI version there too (I'm glad MSVC is now compatible from vs2015 to vs2022, and even clang-cl supports it, but no idea how Linux/OSX is)

@lalitb
Copy link
Member

lalitb commented Jun 12, 2024

  • The API in otel-cpp is header-only and is the most used component (as used for library instrumentation), so binary package is not required. We could distribute a source package (for most common distros) containing only the API headers if needed.
  • The SDK and exporters, however, require binary packages. I agree that the matrix of build configurations, architectures, compilers, platforms, and distributions is too extensive to support fully.

@svrnm
Copy link
Member Author

svrnm commented Jun 14, 2024

The API in otel-cpp is header-only and is the most used component (as used for library instrumentation), so binary package is not required. We could distribute a source package (for most common distros) containing only the API headers if needed.

If this would be possible, I think that would already be a great starting point. The API is especially relevant for projects that want to provide "native instrumentation", so having an easy way to take dependency would be great!

The SDK and exporters, however, require binary packages. I agree that the matrix of build configurations, architectures, compilers, platforms, and distributions is too extensive to support fully.

If we want to do that, we might consider to start as small as possible, i.e. what are the one or two build configurations/architectures/etc. with the most value?

I think we should start as small as possible and then start from there. I also heard from last SIG meeting that maybe making sure that vcpkg/conan are up-to-date would already be a great improvement?

@malkia
Copy link

malkia commented Jun 14, 2024

A binary with (minimum) OTLP/grpc support would make most sense to me.

@svrnm
Copy link
Member Author

svrnm commented Jun 17, 2024

Sounds to me like a starting point could be the following:

  • Work towards "official"1 support for conan and vcpkg
  • Provide a binary release with a minimum amount of features (otlp/grpc support, no other exporters, strip all features with "too many dependencies", etc.). Platform-wise maybe starting with linux+glibc on x86_64 might be good to begin with?

Footnotes

  1. Providing official support is a multi-step effort with "support" meaning very different things. To begin with this would just mean that OTel Community Members make sure that updates are supplied to conan&vcpkg, this could be still a "best effort"/"alpha" support without any guarantees and with the potential to be withdrawn again.

@marcalff
Copy link
Member

marcalff commented Jun 20, 2024

Random collection of notes, which have an impact on packaging:

  • the situation with all the ABI flavors needs to be clarified, we can't mix several flavors together
  • releasing binary packages for each operating system implies having access to runners
  • releasing binary packages timely, in case of changes in dependencies, requires a lot of resources, and is a great responsibility
  • to make a package, dependencies must also provide packages to build upon (for example, prometheus-cpp)
  • an alternate possibility is to not provide binary packages, but provide the packages specs, so that anyone can build a binary package from specs (on their own hardware, which increases the os coverage), and at their own pace (which resolves the issue of re releasing a package when a dependency changes)

Tentative list of packages:

  • opentelemetry-cpp-api
  • opentelemetry-cpp-sdk
  • opentelemetry-cpp-exporter-otlp-http-trace
  • opentelemetry-cpp-exporter-otlp-grpc-trace
  • opentelemetry-cpp-exporter-otlp-file-trace
  • opentelemetry-cpp-exporter-otlp-http-metric
  • opentelemetry-cpp-exporter-otlp-grpc-metric
  • opentelemetry-cpp-exporter-otlp-file-metric
  • opentelemetry-cpp-exporter-otlp-http-log
  • opentelemetry-cpp-exporter-otlp-grpc-log
  • opentelemetry-cpp-exporter-otlp-file-log
  • opentelemetry-cpp-exporter-ostream-trace
  • opentelemetry-cpp-exporter-ostream-metric
  • opentelemetry-cpp-exporter-ostream-log
  • opentelemetry-cpp-exporter-prometheus
  • opentelemetry-cpp-exporter-zipkin

Packages can also provide -debug and -release options

For implementing third party exporters, we also need the -dev packages with header files.

The overall scope of packaging gets big very fast, this is neither trivial nor minor.

@svrnm
Copy link
Member Author

svrnm commented Jun 21, 2024

* releasing binary packages for each operating system implies having access to runners

Via CNCF we have access to a variety of runners, this is doable.

* releasing binary packages timely, in case of changes in dependencies, requires a lot of resources, and is a great responsibility

This is a very valid concern!

* to make a package, dependencies must also provide packages to build upon (for example, prometheus-cpp)

What list of the packages below hast the least amount of dependencies, or which packages have dependencies that require mainly dependencies one can expect endusers have readily available?

* an alternate possibility is to not provide binary packages, but provide the packages specs, so that anyone can build a binary package from specs (on their own hardware, which increases the os coverage), and at their own pace (which resolves the issue of re releasing a package when a dependency changes)

Can you elaborate? This might be a valuable piece to provide

Tentative list of packages:

* opentelemetry-cpp-api

* opentelemetry-cpp-sdk

* opentelemetry-cpp-exporter-otlp-http-trace

* opentelemetry-cpp-exporter-otlp-grpc-trace

* opentelemetry-cpp-exporter-otlp-file-trace

* opentelemetry-cpp-exporter-otlp-http-metric

* opentelemetry-cpp-exporter-otlp-grpc-metric

* opentelemetry-cpp-exporter-otlp-file-metric

* opentelemetry-cpp-exporter-otlp-http-log

* opentelemetry-cpp-exporter-otlp-grpc-log

* opentelemetry-cpp-exporter-otlp-file-log

* opentelemetry-cpp-exporter-ostream-trace

* opentelemetry-cpp-exporter-ostream-metric

* opentelemetry-cpp-exporter-ostream-log

* opentelemetry-cpp-exporter-prometheus

* opentelemetry-cpp-exporter-zipkin

Packages can also provide -debug and -release options

For implementing third party exporters, we also need the -dev packages with header files.

Doe we really need all of them, maybe starting with a subset like -api, -sdk, exporter-otlp-http-trace, -exporter-ostream-trace?

The overall scope of packaging gets big very fast, this is neither trivial nor minor.

Yes, it absolutely is, so thanks for taking a look anyway. I think not doing it now is still a valid outcome but in the future this issue can be used as reference to either continue this discussion or to validate if things have changed and can be addressed

Copy link

This issue was marked as stale due to lack of activity.

@github-actions github-actions bot added the Stale label Aug 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Stale triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
Development

No branches or pull requests

4 participants