-
Notifications
You must be signed in to change notification settings - Fork 455
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
[API] Clarify expectations for C++ exceptions, and usage of noexcept methods. #3013
Comments
I'll work on this. Currently, there are 20 warnings flagged by |
This issue was marked as stale due to lack of activity. |
Hi @msiddhu, did you get anywhere in generating the spreadsheet for this? I'm interested in the status of it because in the current state, the functions being marked as I also see that in places where this is attempted to be handled, such as in #3012, that the exception handling can also throw exceptions such as when building up the I'm happy to submit some small PRs to address some but your comment hints that some of these may not be so trivial to fix. |
I've come across another case where exceptions may be thrown in non-obvious ways in functions marked as Some places constructing a There are several places that do this. 1 example is in Tracer::StartSpan. |
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
The text was updated successfully, but these errors were encountered: