-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[feat]PIP-410: Add a metric to track publish buffer usage. #23751
base: master
Are you sure you want to change the base?
[feat]PIP-410: Add a metric to track publish buffer usage. #23751
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.
Since Pulsar is slowly migrating to OTel for metrics, please also handle OTel for this added metric.
For metric changes, it would be useful to at least have a discussion on the dev mailing list since our PIP policy states that a PIP is required for changes in metrics.
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/ServerCnx.java
Outdated
Show resolved
Hide resolved
Thanks for your comment. You are right, this a WIP PR, and I will do it later when I am available |
# Conflicts: # pulsar-broker/src/main/java/org/apache/pulsar/broker/service/ServerCnx.java
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #23751 +/- ##
============================================
+ Coverage 73.57% 74.19% +0.62%
+ Complexity 32624 32385 -239
============================================
Files 1877 1861 -16
Lines 139502 144189 +4687
Branches 15299 16420 +1121
============================================
+ Hits 102638 106987 +4349
+ Misses 28908 28752 -156
- Partials 7956 8450 +494
Flags with carried forward coverage won't be shown. Click here to find out more.
|
OpenTelemetryAssertions.assertThat(metricData).anySatisfy(metric -> | ||
OpenTelemetryAssertions.assertThat(metric).hasName("pulsar.broker.publish.buffer.usage") | ||
.hasLongGaugeSatisfying(gauge -> | ||
gauge.hasPointsSatisfying(point -> point.hasValue(0)))); |
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.
The initial value and result are both 0, it cannot be determined whether it has taken effect?
PIP: #24028
Motivation
Add a metric to track broker side publish buffer usage.
Modifications
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
doc
doc-required
doc-not-needed
doc-complete
Matching PR in forked repository