Skip to content

Conversation

@rwwiv
Copy link
Contributor

@rwwiv rwwiv commented May 2, 2025

This PR does two things:

  • It moves away from using an exported function defined as a variable in util.go (i.e. sendHTTPRequest) in favor of an interface (Sender) with the intention that this be the first step towards pulling this code out of the library.
  • It also fixes this issue by ensuring the short-lived client created when sending alerts to an Alertmanager receiver does not keep the created connections alive.

@rwwiv rwwiv requested a review from a team as a code owner May 2, 2025 20:27
@github-project-automation github-project-automation bot moved this to In review in Alerting May 2, 2025
Comment on lines +194 to +195
// Disable keep alive since this is a short lived client
DisableKeepAlives: true,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is the line that fixes the bug mentioned in the PR desc.

@rwwiv rwwiv changed the title Refactor + fix request sender used by Alertmanager receiver Refactor + fix request sender used by Alertmanager notifier May 2, 2025
Disable keep alives and add test to verify

Fix lint
@moustafab moustafab force-pushed the rwwiv/am-receiver-sender-cleanup branch from e434b6c to 556b394 Compare July 24, 2025 14:31
@wiemerc
Copy link

wiemerc commented Sep 17, 2025

Is this PR still being worked on? We would really appreciate if it least the fix could be merged because we are affected by this issue too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In review

Development

Successfully merging this pull request may close these issues.

2 participants