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

Bug fix for duplicate log events by resetting the response body stream in agent health #1337

Merged
merged 2 commits into from
Sep 5, 2024

Conversation

bryce-carey
Copy link
Contributor

Description of the issue

Duplicate log events are being published for all use-cases. This was determined to be due to the reading of the HTTP response body in the agent health extension. The body is being read elsewhere, but can only be read once. We reset the body to address the issue.

Description of changes

Resets the response body stream with the content that was read.

License

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Tests

Manually tested to confirm that the log events are no longer duplicated.

Requirements

Before commit the code, please do the following steps.

  1. Run make fmt and make fmt-sh
  2. Run make lint

@bryce-carey bryce-carey requested a review from a team as a code owner September 5, 2024 14:02
Copy link
Contributor

@jefchien jefchien left a comment

Choose a reason for hiding this comment

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

@bryce-carey bryce-carey merged commit 76279c7 into main Sep 5, 2024
210 of 332 checks passed
@bryce-carey bryce-carey deleted the duplicate-log-fix branch September 5, 2024 15:17
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.

4 participants