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

[feature] Support custom refresh intervals for each group of metrics #2718

Merged
merged 44 commits into from
Nov 9, 2024

Conversation

zuobiao-zhou
Copy link
Member

What's changed?

close #2188

Support custom refresh intervals for each group of metrics. The specific implementation is as follows:

  1. Construct a cycle of job refresh interval list based on the refresh intervals of each metric.
  2. When the job dispatches, select metrics that are due for refresh to form priorMetrics.

Checklist

  • I have read the Contributing Guide
  • I have written the necessary doc or comment.
  • I have added the necessary unit tests and all cases have passed.

@github-actions github-actions bot added doc Improvements or additions to documentation collector backend labels Sep 15, 2024
@zuobiao-zhou
Copy link
Member Author

zuobiao-zhou commented Sep 15, 2024

@tomsun28 Hi, the strange problem mentioned here #2271 (comment) has been solved.
According to the previous code, for jobs with multiple collection metrics, the metrics.setCollectTime execution time for metrics with a higher priority is somewhat delayed. This causes them to be missed during the selection of expired metrics in the next cycle, resulting in updates occurring every two cycles. so I move metrics.setCollectTime in constructPriorMetrics.
image
image
image
image
image
image
Customize collect intervals have been tested and there are no problem.

@tomsun28 tomsun28 added the good first pull request Good for newcomers label Sep 16, 2024
@tomsun28
Copy link
Contributor

👍👍thanks LGTM, test passed. Since this involves basic scheduling, and we are preparing a new version, can we merge this major feature after the 1.6.1 release (maybe end of this month)?

@tomsun28 tomsun28 added this to the 1.6.2 milestone Sep 18, 2024
@zuobiao-zhou
Copy link
Member Author

👍👍thanks LGTM, test passed. Since this involves basic scheduling, and we are preparing a new version, can we merge this major feature after the 1.6.1 release (maybe end of this month)?

I agree, we need to make this feature more stable before releasing it.

@zhangshenghang
Copy link
Member

😄 When will this PR plan be merged? I need to use this feature.

@yangshuDBA
Copy link

When will this PR plan be merged? I need to use this feature.😄

Copy link
Contributor

@tomsun28 tomsun28 left a comment

Choose a reason for hiding this comment

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

👍

@tomsun28 tomsun28 merged commit caf13c0 into apache:master Nov 9, 2024
3 of 4 checks passed
@zuobiao-zhou zuobiao-zhou deleted the zuobiao-zhou-customize-interval branch November 9, 2024 14:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc Improvements or additions to documentation good first pull request Good for newcomers new feature
Projects
Development

Successfully merging this pull request may close these issues.

[Task] Customizable Refresh Intervals for Monitoring Metrics
7 participants