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

Ensure pipeline metrics are cleared on the shutdown #16264

Merged

Conversation

edmocosta
Copy link
Contributor

Release notes

Fixed the configuration reload process to clean up the pipeline's metric store, so it does not retain references to failed pipelines components.

What does this PR do?

Ensure the pipeline's metrics are cleaned on the shutdown, so failed config reloads does not leak metrics from old pipeline reloads attempts.

Why is it important/What is the impact to the user?

Those stale metrics are consuming memory and are being returned on the stats API, causing confusion and huge payloads.

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files (and/or docker env variables)
  • I have added tests that prove my fix is effective or that my feature works

Related issues

Copy link

Quality Gate passed Quality Gate passed

Issues
0 New issues
0 Fixed issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarQube

@elasticmachine
Copy link
Collaborator

💚 Build Succeeded

@edmocosta edmocosta changed the title Fix failed config reloads metrics leak Ensure pipeline metrics are cleared on the shutdown Jun 26, 2024
@edmocosta edmocosta marked this pull request as ready for review June 26, 2024 14:06
@edmocosta edmocosta requested review from jsvd and yaauie June 26, 2024 14:07
Copy link
Member

@jsvd jsvd left a comment

Choose a reason for hiding this comment

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

LGTM

@edmocosta edmocosta merged commit 784fa18 into elastic:main Jun 28, 2024
6 checks passed
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.

Failed config reloads in Logstash causes resources leaks
3 participants