[CODE HEALTH] Fix clang-tidy bugprone-exception-escape in sum_aggregation.cc#4109
Merged
marcalff merged 4 commits intoJun 5, 2026
Merged
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4109 +/- ##
==========================================
- Coverage 82.01% 81.95% -0.05%
==========================================
Files 385 385
Lines 16031 16067 +36
==========================================
+ Hits 13146 13166 +20
- Misses 2885 2901 +16
🚀 New features to boost your workflow:
|
lalitb
reviewed
Jun 1, 2026
| return; | ||
| } | ||
| const std::lock_guard<opentelemetry::common::SpinLockMutex> locked(lock_); | ||
| point_data_.value_ = nostd::get<int64_t>(point_data_.value_) + value; |
Member
There was a problem hiding this comment.
Probably.
This should still raise a warning, so it will be picked up by subsequent cleanups.
Member
|
LGTM once the - #4109 (comment) - is resolved. Separately, same issue exists for other aggregations too, probably good to have a followup ? |
lalitb
approved these changes
Jun 1, 2026
Contributor
|
Add an entry to the changelog? |
marcalff
approved these changes
Jun 5, 2026
| return; | ||
| } | ||
| const std::lock_guard<opentelemetry::common::SpinLockMutex> locked(lock_); | ||
| point_data_.value_ = nostd::get<int64_t>(point_data_.value_) + value; |
Member
There was a problem hiding this comment.
Probably.
This should still raise a warning, so it will be picked up by subsequent cleanups.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #2053
Changes
Replace throwing nostd::get() calls with non-throwing nostd::get_if() in 4 noexcept functions. On type mismatch (which should never happen in practice), log an error and return a zero-valued aggregation instead of invoking std::terminate().
For significant contributions please make sure you have completed the following items:
CHANGELOG.mdupdated for non-trivial changesAI
Assisted-by: This contribution was prepared with the assistance of an AI development tool.