-
Notifications
You must be signed in to change notification settings - Fork 895
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
Limit types allowed for Log Record Body
#1752
Comments
Body
Body
I would like to clarify my comment that you're referencing (#1727 (comment)). When I said "unstructured blob goes to Body" I meant it from the logging API point of view:
It does not mean that obj itself is unstructured - depending on the logger it might try to serialize it into a JSON string, or even in a nested I think the underlying issue in these discussions is how to make the API to be prescriptive such that the logging can be expressed in truly vendor-agnostic way, because if there is no specific expectation of what the backend can do with data represented this or other way, then what's the difference how to log it. But I am not sure we're in a position to make such call from the spec/API level - some backends might be smart enough to pick apart a structure even in a Body blob, while others may not be smart enough to even index Attributes. |
My goal with this issue is to validate if we need to have complex types in When looking at the example mappings - the cases where The other way to look at it is if end-user will want to discern between |
I feel like keeping it make sense. Do you think the resolution for this issue might be some additional clarification on how it is used? Or it is clear enough already? |
@SergeyKanzhelev this was actually sparked by the attempt to clarify it: #1727 :) |
Sorry, missed that. |
I actually think that #1752 (comment) makes a lot of sense - it may be the best we can do from vendor-neutral data collection standpoint |
I am not sure if JSON strings in |
Resolves #2066 and #1752 Supports #2068 ## Changes Adds a note to the log data model which explains the intended usage of the `Body` field. ## Additional Context Extensive discussion has been had on this issue on [#1613](#1613 (comment)), as well as in the Log SIG group.
I believe this issue should be closed now. #2096 clarifies that body can be structured. |
Resolves open-telemetry#2066 and open-telemetry#1752 Supports open-telemetry#2068 ## Changes Adds a note to the log data model which explains the intended usage of the `Body` field. ## Additional Context Extensive discussion has been had on this issue on [open-telemetry#1613](open-telemetry#1613 (comment)), as well as in the Log SIG group.
What are you trying to achieve?
Currently,
Body
is ofany
type, which allows for strings (actually, scalars), byte array, list ofany
values or amap<string, any>
. In the last case, this brings confusion when to useAttributes
(which is ofmap<string, any>
)This was discussed in #1613 and #1727
One of the observations was that we anticipate either fully-structured or partially-structured logs and it's hard to anticipate a use case when
Body
coming from a logging library would contain a map or an array.Perhaps the
Body
type should be reconsidered and limited tostring
andbytearray
, which better fits the existing use-cases. This would also avoid the confusion when to use Attributes. The complex types could be still included as entries inAttributes
.The text was updated successfully, but these errors were encountered: