Skip to content

Conversation

@tianchu
Copy link
Contributor

@tianchu tianchu commented Oct 5, 2021

What does this PR do?

Sometimes the log content from s3 object may contain characters that are not encoded in utf-8, and it would cause the Forwarder to error like UnicodeDecodeError: 'utf-8' codec can't decode byte 0xfd in position 115924522: invalid start byte. This PR makes the Forwarder to ignore the invalid or non-decodable characters, and therefore it doesn't error and still forward the rest of the logs that are valid.

Motivation

Testing Guidelines

Additional Notes

Types of changes

  • Bug fix
  • New feature
  • Breaking change
  • Misc (docs, refactoring, dependency upgrade, etc.)

Check all that apply

  • This PR's description is comprehensive
  • This PR contains breaking changes that are documented in the description
  • This PR introduces new APIs or parameters that are documented and unlikely to change in the foreseeable future
  • This PR impacts documentation, and it has been updated (or a ticket has been logged)
  • This PR's changes are covered by the automated tests
  • This PR collects user input/sensitive content into Datadog
  • This PR passes the integration tests (ask a Datadog member to run the tests)
  • This PR passes the unit tests
  • This PR passes the installation tests (ask a Datadog member to run the tests)

@tianchu tianchu merged commit 053ef44 into master Oct 5, 2021
@tianchu tianchu deleted the tian.chu/ignore-non-utf8-chars branch October 5, 2021 13:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants