-
Notifications
You must be signed in to change notification settings - Fork 897
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
Update Attributes field type in Logs Data Model #3816
Closed
pellared
wants to merge
6
commits into
open-telemetry:main
from
pellared:log-datamodel-update-field-types
Closed
Update Attributes field type in Logs Data Model #3816
pellared
wants to merge
6
commits into
open-telemetry:main
from
pellared:log-datamodel-update-field-types
Conversation
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
pellared
changed the title
[WIP] Update types of Resource and Attributes fields in Logs Data Model
Update types of Resource and Attributes fields in Logs Data Model
Jan 11, 2024
This was referenced Jan 11, 2024
pellared
changed the title
Update types of Resource and Attributes fields in Logs Data Model
Update Attributes field type in Logs Data Model
Jan 16, 2024
SIG meeting notes:
|
After digesting all the information I decide to mark the PR as draft and wait until the resolution of #2888. If it is merged then this PR could be probably stay as it is. Otherwise, it would be probably good to add notices that log attributes are different from (a superset of) common attributes. |
This PR was marked stale due to lack of activity. It will be closed in 7 days. |
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.
Changes
Change the type of
Attributes
to reference the common definition of attributes collection.Why
None language currently supports "nested values" in log attributes. All of them represent attributes in the same way for all signals.
KeyValuePair<string, object?>
and a map as value is not supported by OTLP exporterI feel it would be awkward if attributes in different signals would be modeled differently especially that attributes are defined in the specification separately in a "common" directory. Moreover, the common definition of attributes collection even mentions logs attributes:
opentelemetry-specification/specification/common/README.md
Line 128 in 12cd1b1
If we would like to have "nested values" in attributes then I think that it should be addressed as part of #376.
I think that the most important thing is to handle "nested values" in
Body
so that logs can handle structured log records (events).EDIT: However, a lot of logging attributes allow adding nested/structured attributes to the log records.
These changes can be seen as breaking. However, there is 100% precedence of how log attributes and resource are currently handled in all languages that have logs marked as stable and experimental (except Erlang which I have not checked).
Related PRs: