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

Add 'log.record.original' attribute #1217

Merged
merged 7 commits into from
Jul 11, 2024

Conversation

djaglowski
Copy link
Member

@djaglowski djaglowski commented Jul 9, 2024

Fixes #1137

Changes

Add 'log.record.original' attribute.

Merge requirement checklist

@djaglowski djaglowski marked this pull request as ready for review July 9, 2024 13:44
@djaglowski djaglowski requested review from a team July 9, 2024 13:44
Copy link
Member

@joaopgrassi joaopgrassi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I skimmed through the linked spec issue and I see most folks agree with a semantic conventions for this, but I wonder what will be the outcome of having this convention here? Will then receivers have to build knowledge of this semantic field? What is the overall plan? I ask because your last comment there says there's no support for it so I wonder what the convention will solve.

docs/general/logs.md Outdated Show resolved Hide resolved
Co-authored-by: Tigran Najaryan <[email protected]>
@djaglowski
Copy link
Member Author

I skimmed through the linked spec issue and I see most folks agree with a semantic conventions for this, but I wonder what will be the outcome of having this convention here? Will then receivers have to build knowledge of this semantic field? What is the overall plan? I ask because your last comment there says there's no support for it so I wonder what the convention will solve.

Even if there is no functionality provided for this attribute, it will be helpful for users who are looking for a standard way to back up the original log value. The question of how to properly preserve it has come up many times and this would provide a standard answer. For example, one team may make a point to populate this attribute according the description, without any need to understand whether or how it will be used. Another team downstream can check for the attribute and use it is present.

That said, if this is released I will propose adding support to several receivers in the collector. Tentatively, that functionality may include:

  • In several receivers which deal directly with traditional logs (filelog, syslog, tcplog, udplog), automatically populate this attribute when a string or []byte body is overridden.
  • In other receivers which interact with traditional log providers (windows event log, journald), add a config option to both parse and preserve the log. (e.g. windows event log currently forces a choice but some users need both).
  • Potentially, OTTL could populate this attribute automatically.
  • Some exporters may choose to check for this attribute and use it if present.

model/registry/log.yaml Outdated Show resolved Hide resolved
docs/general/logs.md Outdated Show resolved Hide resolved
docs/general/logs.md Outdated Show resolved Hide resolved
Copy link
Member

@joaopgrassi joaopgrassi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@djaglowski thanks for the explanation!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Propose new "log.original.body" attribute
5 participants