-
Notifications
You must be signed in to change notification settings - Fork 475
[EXPORTER] ostream log exporter, fix memory ownership issues #3417
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
base: main
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for opentelemetry-cpp-api-docs canceled.
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3417 +/- ##
==========================================
- Coverage 90.01% 89.87% -0.13%
==========================================
Files 212 212
Lines 6932 6936 +4
==========================================
- Hits 6239 6233 -6
- Misses 693 703 +10
🚀 New features to boost your workflow:
|
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.
Nicely done, thanks. I would ideally prefer to get rid of ReadableLogRecord
, and just have ReadWriteLogRecord
(probably renamed to LogData
), and so have the API consistent with SpanData
, but that's not related to the issue :)
Is this a breaking change if |
Seems #3147 includes the renaming to |
Fixes #3135
Fixes #2651
Changes
Fixed the following memory ownership issues in the ostream log exporter:
ReadWriteLogRecord
, memberbody_
now owns a copy of the log bodyReadWriteLogRecord
, memberattributes_map_
now owns a copy of log attributesThis prevents the use of stale pointers, that could lead to crashes previously.
For significant contributions please make sure you have completed the following items:
CHANGELOG.md
updated for non-trivial changes