Skip to content
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

Propose new "log.original.body" attribute #1137

Closed
djaglowski opened this issue Jun 10, 2024 · 3 comments · Fixed by #1217
Closed

Propose new "log.original.body" attribute #1137

djaglowski opened this issue Jun 10, 2024 · 3 comments · Fixed by #1217
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

Comments

@djaglowski
Copy link
Member

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:

  1. A complete original representation of a structured log
  2. A complete original representation of an unstructured (string) log
  3. The "message" portion of a log

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

@djaglowski djaglowski added enhancement New feature or request experts needed This issue or pull request is outside an area where general approvers feel they can approve triage:needs-triage labels Jun 10, 2024
@djaglowski
Copy link
Member Author

What needs to happen in order to move this forward? Should I open a PR?

@MSNev
Copy link
Contributor

MSNev commented Jun 21, 2024

@lmolkova We don't believe that this is related to events, so removing from our tracking board.

@MSNev MSNev removed this from Logs SIG Jun 21, 2024
@trask
Copy link
Member

trask commented Jun 21, 2024

What needs to happen in order to move this forward? Should I open a PR?

that seems reasonable to me given the discussion that has already taken place in open-telemetry/opentelemetry-specification#3932

since there's no Semantic Convention expert group that covers log.* attributes, it may help to join the General Semantic Convention SIG meeting to discuss if your PR doesn't get traction

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants