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

Endpoint reload cleanly to prevent duplicate registration #1994

Draft
wants to merge 16 commits into
base: main
Choose a base branch
from

Conversation

mattdurham
Copy link
Collaborator

@mattdurham mattdurham commented Oct 29, 2024

This PR fixes an issue with duplicate metrics registration and sending to a closed channel on config changes. By wrapping the mailboxes we can prevent them from explicitly being closed. This can happen in the middle of a scrape where the metrics are still being written to the old endpoint.

This also starts laying the ground work for draining the loops before stopping them to preserve metrics.

@mattdurham mattdurham marked this pull request as ready for review October 30, 2024 13:09
@mattdurham mattdurham requested a review from a team as a code owner October 30, 2024 13:09
@mattdurham mattdurham changed the title Endpoint reload cleanly Endpoint reload cleanly to prevent duplicate registration Oct 30, 2024
@mattdurham mattdurham enabled auto-merge (squash) October 30, 2024 13:26
@mattdurham mattdurham marked this pull request as draft October 31, 2024 11:31
auto-merge was automatically disabled October 31, 2024 11:31

Pull request was converted to draft

@mattdurham
Copy link
Collaborator Author

Setting this back to draft, since I am going to move this functionality into a fork.

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