-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[improve] [broker] Make exposing topic level metric dynamic #21006
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
base: master
Are you sure you want to change the base?
[improve] [broker] Make exposing topic level metric dynamic #21006
Conversation
|
@asafm Please help take a look this at this PR and it is related to metrics, thanks. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #21006 +/- ##
=============================================
+ Coverage 36.84% 67.28% +30.43%
- Complexity 12195 35854 +23659
=============================================
Files 1698 1921 +223
Lines 129852 175600 +45748
Branches 14161 23035 +8874
=============================================
+ Hits 47843 118148 +70305
+ Misses 75680 47827 -27853
- Partials 6329 9625 +3296
Flags with carried forward coverage won't be shown. Click here to find out more.
|
|
@hangc0276 It looks ok, aside from the fact that you don't have any test to validate it and protect from even being ruined :) |
|
The pr had no activity for 30 days, mark with Stale label. |
dao-jun
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Fixes #xyz
Main Issue: #xyz
PIP: #xyz
Motivation
Exposing topic-level metrics costs a lot of CPU and memory for brokers and put heavy traffic pressure on Prometheus to pull metrics, especially when the Pulsar cluster has thousands of topics. To address this issue, we can disable the topic-level metrics by default and enable it when some topics encountered any issues.
However, the
exposeTopicLevelMetricsInPrometheusflag is not dynamic and we need to change the broker configuration and restart all the brokers to enable or disable the flag.We can make the
exposeTopicLevelMetricsInPrometheusflag dynamic to avoid restarting all the brokers when enabling or disabling the flagModifications
Make the following flags dynamic
Verifying this change
(Please pick either of the following options)
This change is a trivial rework / code cleanup without any test coverage.
(or)
This change is already covered by existing tests, such as (please describe tests).
(or)
This change added tests and can be verified as follows:
(example:)
Does this pull request potentially affect one of the following parts:
If the box was checked, please highlight the changes
Documentation
docdoc-requireddoc-not-neededdoc-completeMatching PR in forked repository
PR in forked repository: