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

Mapping json in kafka receiver to log record fields #24265

Closed
thmshmm opened this issue Jul 14, 2023 · 3 comments
Closed

Mapping json in kafka receiver to log record fields #24265

thmshmm opened this issue Jul 14, 2023 · 3 comments

Comments

@thmshmm
Copy link
Contributor

thmshmm commented Jul 14, 2023

Component(s)

receiver/kafka

Describe the issue you're reporting

The implementation of the json encoder creates an empty log record and sets the parsed json as body. Additionally it sets the log record timestamp to the current processing time.

Having json log messages in Kafka like

{"timestamp": 1689323017, "message": "this is a log message", "logLevel": "info", ...}

what is the intended way of mapping the json to a log record that is not just an empty wrapper?

@thmshmm thmshmm added the needs triage New item requiring triage label Jul 14, 2023
@github-actions
Copy link
Contributor

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

@crobert-1
Copy link
Member

Hello @thmshmm, from the original issue #20734, it looks like the intention was a pretty simple conversion from raw to json encoding.

Do you have suggestions on how this could be done better, or any specific requests here?

@atoulme atoulme removed the needs triage New item requiring triage label Sep 9, 2023
@thmshmm
Copy link
Contributor Author

thmshmm commented Nov 28, 2023

Solutions is to just use transformations to extract the body json fields into OTel log record fields. I'll close it.

@thmshmm thmshmm closed this as completed Nov 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants