-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
[Issue 9804] Allow to enable or disable the cursor metrics #9814
Conversation
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.
Could you please add some tests?
@limingnihao Please help review this PR, thanks. |
// generate managedCursor metrics | ||
parseMetricsToPrometheusMetrics(new ManagedCursorMetrics(pulsar).generate(), | ||
clusterName, Collector.Type.GAUGE, stream); | ||
if(includeManagedCursorMetrics){ |
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.
Why not use pulsar.getConfiguration().isExposeManagedCursorMetricsInPrometheus()
here? BTW, please note the code style if (...) {}
.
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.
Just for being consistent with includeConsumerMetrics
, includeProducerMetrics
etc.
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, please add a test case or update existing test case in PrometheusMetricsTest to verify the behavior.
/pulsarbot run-failure-checks |
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
Please add a testcase
… and fix code style
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.
Looks great
Thanks
@murong00 Could you please review this PR again? |
/pulsarbot run-failure-checks |
Fixes #9804
Motivation
Allow to enable or disable the cursor metrics
Modifications
add config item
exposeManagedCursorMetricsInPrometheus
to allow user to enable or disable the cursor metricsVerifying this change