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

fix(outputs.prometheus_client): expire with ticker, not add/collect #12560

Merged
merged 1 commit into from
Jan 31, 2023

Conversation

powersj
Copy link
Contributor

@powersj powersj commented Jan 27, 2023

The current method of expiration is to check at every adding or collecting of metrics. However, this blocks and slows a lot of things down. Instead, create a ticker that will launch the expiration process when we actually need to expire.

fixes: #12481

The current method of expiration is to check at every adding or
collecting of metrics. However, this blocks and slows a lot of things
down. Instead, create a ticker that will launch the expiration process
when we actually need to expire.

fixes: influxdata#12481
@telegraf-tiger telegraf-tiger bot added fix pr to fix corresponding bug plugin/output 1. Request for new output plugins 2. Issues/PRs that are related to out plugins labels Jan 27, 2023
@telegraf-tiger
Copy link
Contributor

@powersj powersj added the ready for final review This pull request has been reviewed and/or tested by multiple users and is ready for a final review. label Jan 30, 2023
Copy link
Contributor

@srebhan srebhan left a comment

Choose a reason for hiding this comment

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

Looks good to me. Thanks for the fix @powersj!

@srebhan srebhan merged commit b20e490 into influxdata:master Jan 31, 2023
powersj added a commit that referenced this pull request Feb 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix pr to fix corresponding bug plugin/output 1. Request for new output plugins 2. Issues/PRs that are related to out plugins ready for final review This pull request has been reviewed and/or tested by multiple users and is ready for a final review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Retrieving Metrics from prometheus_client output plugin takes very long since Telegraf version 1.24.4
2 participants