hertzbeat icon indicating copy to clipboard operation
hertzbeat copied to clipboard

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

Open zuobiao-zhou opened this issue 1 year ago โ€ข 3 comments

What's changed?

close https://github.com/apache/hertzbeat/issues/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

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

zuobiao-zhou avatar Sep 15 '24 11:09 zuobiao-zhou

@tomsun28 Hi, the strange problem mentioned here https://github.com/apache/hertzbeat/pull/2271#issuecomment-2232155864 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.

zuobiao-zhou avatar Sep 15 '24 11:09 zuobiao-zhou

๐Ÿ‘๐Ÿ‘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 avatar Sep 18 '24 15:09 tomsun28

๐Ÿ‘๐Ÿ‘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.

zuobiao-zhou avatar Sep 19 '24 01:09 zuobiao-zhou

๐Ÿ˜„ When will this PR plan be merged? I need to use this feature.

zhangshenghang avatar Nov 06 '24 12:11 zhangshenghang

When will this PR plan be merged? I need to use this feature.๐Ÿ˜„

EvanderYang avatar Nov 07 '24 08:11 EvanderYang