open-telemetry / open-telemetry/opentelemetry-cpp
Allow importing only the API package in projects
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 1.4k
- Forks
- 632
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 75
Description
Is your feature request related to a problem?
I'm working in improving support of OTel in Envoy Proxy. Currently, Envoy has it's own tracing code, (not using OTel), but it has an Tracer/Exporter that exports OTLP spans.
We are adding OTel spec-compliant Samplers to it, and we would like to re-use some of the types in the OTel C++ API, mainly around TraceStates. Of course the ultimate goal would be to use the SDK there and not rely on their "fork" things, but that's a long term goal and not as straightforward.
The problem: The import instructions in Incorporating into an existing Bazel Project are targeted to import both the SDK and API packages. For the case of using in Envoy, I only need the API. By following the instructions, I will bring a lot of other unneeded dependencies.
Describe the solution you'd like
I'd like to have a way to import only the API package into existing bazel projects, that brings only the minimum needed dependencies along with it.
Describe alternatives you've considered
None, not sure if there's another bazel magic that can work around this issue. If there are, please let me know!
Additional context
PR discussion about it in Envoy https://github.com/envoyproxy/envoy/pull/32333/files#r1493892700
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the “Incorporating into an existing Bazel Project” section of INSTALL.md and trace how its current import brings in both the API and SDK. The work is complete when the documentation and Bazel setup provide an API-only import with only the minimum required dependencies.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- api, build-system
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100