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] do not output error message for connections closed due to timeout #241

Merged
merged 5 commits into from
Nov 14, 2024

Conversation

khushijain21
Copy link
Contributor

@khushijain21 khushijain21 commented Oct 23, 2024

What does this PR do?

This PR fixes elastic/beats#40824

Why is it important?

Avoid polluting log with use of closed connection errors due to idleConnection timeout

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have added tests that prove my fix is effective or that my feature works

@khushijain21 khushijain21 requested a review from a team as a code owner October 23, 2024 07:40
@khushijain21 khushijain21 requested review from faec and VihasMakwana and removed request for a team October 23, 2024 07:40
@khushijain21 khushijain21 marked this pull request as draft October 23, 2024 07:40
transport/logging.go Outdated Show resolved Hide resolved
@VihasMakwana VihasMakwana self-requested a review October 23, 2024 07:55
@khushijain21 khushijain21 changed the title [WIP] [BUG] do not output error log for connection closed [BUG] do not output error message for connections closed due to timeout Oct 23, 2024
@khushijain21 khushijain21 marked this pull request as ready for review October 23, 2024 08:00
@pierrehilbert pierrehilbert requested review from rdner and removed request for faec October 23, 2024 08:34
@pierrehilbert pierrehilbert added the Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team label Oct 23, 2024
Copy link
Member

@rdner rdner left a comment

Choose a reason for hiding this comment

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

Blocking this PR until we find a better solution. See elastic/beats#40824 (comment)

@khushijain21 khushijain21 marked this pull request as ready for review November 12, 2024 05:26
@khushijain21 khushijain21 requested a review from rdner November 12, 2024 05:26
@elasticmachine
Copy link
Collaborator

💚 Build Succeeded

History

Copy link
Member

@rdner rdner left a comment

Choose a reason for hiding this comment

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

After some investigation with @khushijain21 we didn't find a better solution other than skipping the log entries for the closed connection error.

This error is still returned and should be handled and logged by the consumer of loggingConn type.

@khushijain21 khushijain21 merged commit f3ef8be into elastic:main Nov 14, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unnecessary debug/error logged during idle connection teardown
5 participants