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

Support setting flush interval of the metric log via SentinelConfig property #1919

Merged
merged 3 commits into from
Dec 31, 2020

Conversation

brotherlu-xcq
Copy link
Collaborator

…roperty

Describe what this PR does / why we need it

add a new feature to support control the flush interval of metric via sentinel config: csp.sentinel.metric.flush.interval

Does this pull request fix one issue?

Fixs 1867

Describe how you did it

add a new property in sentinel config(csp.sentinel.metric.flush.interval). control the metic timer start via this config.

  1. if the SentinelConfig#METRIC_FLUSH_INTERVAL more than 0, the timer will run with the SentinelConfig#METRIC_FLUSH_INTERVAL as the rate.
  2. if the SentinelConfig#METRIC_FLUSH_INTERVAL less than 0(include) or value is not valid, then means the timer will not be started.

Describe how to verify it

change the config value, see the metric log file output and use jvm tool to see if the timer thread is started.

Special notes for reviews

@sczyh30 sczyh30 self-requested a review December 21, 2020 07:30
@sczyh30 sczyh30 added area/configuration Issues or PRs related to configurations of Sentinel to-review To review labels Dec 21, 2020
@brotherlu-xcq
Copy link
Collaborator Author

@sczyh30 I have change the code as we discussed.

Copy link
Member

@sczyh30 sczyh30 left a comment

Choose a reason for hiding this comment

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

LGTM

@sczyh30 sczyh30 merged commit a343873 into alibaba:master Dec 31, 2020
@sczyh30 sczyh30 removed the to-review To review label Dec 31, 2020
@sczyh30
Copy link
Member

sczyh30 commented Dec 31, 2020

Nice work. Thanks for contributing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/configuration Issues or PRs related to configurations of Sentinel
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants