open-telemetry / open-telemetry/opentelemetry-cpp
[API] Clarify expectations for C++ exceptions, and usage of noexcept methods.
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 1.4k
- Forks
- 632
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 75
Description
Several methods in the API are flagged as noexcept.
This is desirable, because adding instrumentation to an application (i.e., calling opentelemetry-cpp apis) should not make the application less stable.
In particular, any failure in the opentelemetry-cpp sdk or exporters should not propagate the exception up, taking the application down.
To comply with the noexcept contract, methods in the SDK implementation should never raise exceptions.
According to clang-tidy reports, this is not always the case.
This part should be revisited, to clarify expectations, and enforce the SDK implementation complies.
cc @msiddhu
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 clang-tidy reports mentioned in the issue and review the API methods marked noexcept, including SDK and exporter implementations. Clarify the expected exception behavior and identify which reported paths violate that contract. Done means the expectations are documented and the relevant implementation paths comply without propagating exceptions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- api, observability
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100