-
Notifications
You must be signed in to change notification settings - Fork 450
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
Open
owent
wants to merge
24
commits into
open-telemetry:main
Choose a base branch
from
owent:fix_lifetime_in_log_record
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+1,103
−35
Open
Changes from 13 commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
aa4471d
Fix lifetime for sdk::ReadWriteLogRecord
owent 8c86bbd
Fix unit test
owent cae98c6
Fix unit test
owent b933ee8
Merge branch 'main' into fix_lifetime_in_log_record
owent cfd5db3
Fix a typo
owent 67f66c7
Merge branch 'main' into fix_lifetime_in_log_record
owent 4b8012d
Merge branch 'main' into fix_lifetime_in_log_record
owent 5595d31
Merge branch 'main' into fix_lifetime_in_log_record
lalitb 40c4632
Merge remote-tracking branch 'github/main' into fix_lifetime_in_log_r…
owent 282efec
Implement a new LogRecordData to store both Owned attributes and attr…
owent 3da4bed
Merge branch 'main' into fix_lifetime_in_log_record
owent cf758d1
Merge branch 'main' into fix_lifetime_in_log_record
owent da602f3
Merge branch 'main' into fix_lifetime_in_log_record
owent 94cf407
Merge branch 'main' into fix_lifetime_in_log_record
lalitb 68178bf
Merge branch 'main' into fix_lifetime_in_log_record
owent 4327f87
Merge branch 'main' into fix_lifetime_in_log_record
owent 2f89435
Merge remote-tracking branch 'github/main' into fix_lifetime_in_log_r…
owent a3cffa7
Merge branch 'main' into fix_lifetime_in_log_record
owent 1fc10b0
Merge branch 'main' into fix_lifetime_in_log_record
owent b4bfe00
Merge branch 'main' into fix_lifetime_in_log_record
owent b173dd7
Merge remote-tracking branch 'opentelemetry/main' into fix_lifetime_i…
owent b5198ae
Fixes iwyu
owent 156c229
Merge remote-tracking branch 'opentelemetry/main' into fix_lifetime_i…
owent fabc4a0
Merge branch 'main' into fix_lifetime_in_log_record
owent File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
Oops, something went wrong.
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.
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.
@owent - Do we still need this class?
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.
It's still used by
MixedAttributeMap
, which is used byLogRecordData
.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.
@owent As we agreed here, can we implement the LogRecordData to only contain the owning types, not the mixed types. The motive is to keep the public API simple and minimal. And this will be consistent with SpanData implementation.
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.
I think there are some differents between
LogRecordData
andSpanData
.SpanData::GetAttributes
returnsstd::unordered_map<std::string, opentelemetry::sdk::common::OwnedAttributeValue>
butLogRecordData::GetAttributes
returnsstd::unordered_map<std::string, opentelemetry::common::AttributeValue>
.We need storage to store
span<T>
inopentelemetry::common::AttributeValue
, or do you think we can break the API ofReadableLogRecord::GetAttributes
?@lalitb
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.
Any idea about keep the mixed types or change the API of
ReadableLogRecord::GetAttributes
?