Propose new "log.original.body" attribute #1137
Labels
area:log
enhancement
New feature or request
experts needed
This issue or pull request is outside an area where general approvers feel they can approve
Area(s)
area:log
Is your change request related to a problem? Please describe.
When working with traditional string logs, the log's Body field is sometimes overloaded. This happens because the field is defined such that it is intended for multiple purposes which were previously believed to be mutually exclusive. Paraphrasing from the data model, the body is intended as the appropriate place for any of the following:
However, as demonstrated by examples in open-telemetry/opentelemetry-specification#3932, it is sometimes necessary and often wise to retain more than one of the above within the same payload. Since we will not add a field to disambiguate the "message" from the "original" values, I'm proposing that we define a semantic convention to act as an optional backup location for the original log.
Describe the solution you'd like
A new attribute:
log.original.body
Data type: string or []byte
Description: A copy of the Log Record's original Body value. If the field contains a value, it MUST be exactly the value which the Body first contained. When this field contains a value, it SHOULD be assumed that the Body field was changed.
Describe alternatives you've considered
This follows from a lengthy discussion about adding this as a top-level field in the log data model. Consensus in that conversation appeared to be strongly in favor of a semantic convention instead.
Additional context
No response
The text was updated successfully, but these errors were encountered: