You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
Are any workarounds to this serialization issue?
Thanks!
The text was updated successfully, but these errors were encountered:
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.
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.Are any workarounds to this serialization issue?
Thanks!
The text was updated successfully, but these errors were encountered: