-
Notifications
You must be signed in to change notification settings - Fork 423
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
Fix lifetime for sdk::ReadWriteLogRecord #3147
base: main
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for opentelemetry-cpp-api-docs canceled.
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3147 +/- ##
==========================================
+ Coverage 87.83% 88.05% +0.23%
==========================================
Files 195 195
Lines 6146 6251 +105
==========================================
+ Hits 5398 5504 +106
+ Misses 748 747 -1
|
struct MixedAttributeMapStorage | ||
{ | ||
std::unordered_map<std::string, opentelemetry::common::AttributeValue> attributes; | ||
AttributeMap owened_attributes; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like a typo:
AttributeMap owened_attributes; | |
AttributeMap owned_attributes; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, it's fixed now.
I don't know if this is critical, but this change breaks the ABI:
To reproduce: cmake -B build -DBUILD_SHARED_LIBS=ON -DCMAKE_CXX_FLAGS="-Og -g3" --fresh
cmake --build build -j$(nproc) --clean-first
cmake --install build --prefix ORIG
wget https://patch-diff.githubusercontent.com/raw/open-telemetry/opentelemetry-cpp/pull/3147.diff
patch -p1 < 3147.diff
cmake --build build -j$(nproc)
cmake --install build --prefix NEW
mkdir dumps
for i in ORIG/lib/*.so; do abi-dumper "$i" -o "dumps/orig-$(basename "$i").dump" -lver orig; done
for i in NEW/lib/*.so; do abi-dumper "$i" -o "dumps/new-$(basename "$i").dump" -lver new; done
for i in NEW/lib/*.so; do abi-compliance-checker -l "$(basename "$i")" -old "dumps/orig-$(basename "$i").dump" -new "dumps/new-$(basename "$i").dump; done It will show smth like
|
If I didn't miss anything, I think we only need to keep ABI compatibility for api. These changes keep API compatibility for sdk and exporters. |
I noticed that the library does not have a SOVERSION and thought that the changes could break the existing consumers (I know that Alpine Linux ships OpenTelemetry C++ libraries). That's why I asked :-) |
Fixes #3135
Fixes #2651
Changes
MixedAttributeMap
to store bothstd::unordered_map<std::string, opentelemetry::common::AttributeValue>
andAttributeMap
OwnedAttributeValue
,std::vector<nostd::string_view>
andbool
array forReadWriteLogRecord
.For significant contributions please make sure you have completed the following items:
CHANGELOG.md
updated for non-trivial changes