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

Logs Serialisation #32975

Closed
lydiaong opened this issue May 10, 2024 · 2 comments
Closed

Logs Serialisation #32975

lydiaong opened this issue May 10, 2024 · 2 comments
Labels

Comments

@lydiaong
Copy link

Component(s)

exporter/awscloudwatchlogs, receiver/filelog

Describe the issue you're reporting

I am using the file log receiver to read a XML file and exporting the logs to AWS CloudWatch.
My original XML logs in the file looks like this <?xml version="1.0" encoding="UTF-8" ?>
However, when it is exported out to CloudWatch, it gets encoded like this \u003c?xml version=\"1.0\" encoding=\"UTF-8\" ?\u003e\r\n\u003cEvents

I did a manual testing to CloudWatch to check if the issue lies with CloudWatch but <hello> does not get encoded. Attaching a reference below.
image

Are any workarounds to this serialization issue?
Thanks!

@lydiaong lydiaong added the needs triage New item requiring triage label May 10, 2024
Copy link
Contributor

Pinging code owners:

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

@lydiaong lydiaong closed this as not planned Won't fix, can't repro, duplicate, stale May 10, 2024
@lydiaong lydiaong reopened this May 10, 2024
@andrzej-stencel
Copy link
Member

andrzej-stencel commented May 30, 2024

As @djaglowski responded on CNCF Slack:

I see this kind of question a lot and usually it ends up being that the tool you are viewing it with is adding the escapes in order to show you that it is a string

I agree that it's most likely that the data is fine. Note that <hello> looks fine, because the XML is not not embedded in JSON. What if you send {"body":"<hello>"}?

Also the best way to verify that the data out of the Collector is fine is to use the Debug exporter or the File exporter and inspect the output from those.

Please reopen if you find that the output from collector is indeed garbled, and post the output from Debug exporter or File exporter or some other tool confirming this.

@andrzej-stencel andrzej-stencel removed the needs triage New item requiring triage label May 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants