pulsar
pulsar copied to clipboard
[feat][monitor] PIP-223: Add metrics for all rest endpoints.
PIP: https://github.com/apache/pulsar/issues/18560
Motivation
https://github.com/apache/pulsar/issues/18560
Modifications
Verifying this change
- [ ] Make sure that the change passes the CI checks.
(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:)
- Added integration tests for end-to-end deployment with large payloads (10MB)
- Extended integration test for recovery after broker failure
Does this pull request potentially affect one of the following parts:
If the box was checked, please highlight the changes
- [ ] Dependencies (add or upgrade a dependency)
- [ ] The public API
- [ ] The schema
- [ ] The default values of configurations
- [ ] The threading model
- [ ] The binary protocol
- [ ] The REST endpoints
- [ ] The admin CLI options
- [x] The metrics
- [ ] Anything that affects deployment
Documentation
- [ ]
doc - [x]
doc-required - [ ]
doc-not-needed - [ ]
doc-complete
Matching PR in forked repository
PR in forked repository: https://github.com/dao-jun/pulsar/pull/6
refers to: https://github.com/apache/pulsar/pull/18836
Codecov Report
Attention: Patch coverage is 86.79245% with 7 lines in your changes are missing coverage. Please review.
Project coverage is 73.59%. Comparing base (
bbc6224) to head (e139404). Report is 19 commits behind head on master.
Additional details and impacted files
@@ Coverage Diff @@
## master #21772 +/- ##
============================================
+ Coverage 73.57% 73.59% +0.01%
+ Complexity 32624 32153 -471
============================================
Files 1877 1878 +1
Lines 139502 139603 +101
Branches 15299 15321 +22
============================================
+ Hits 102638 102737 +99
+ Misses 28908 28878 -30
- Partials 7956 7988 +32
| Flag | Coverage Δ | |
|---|---|---|
| inttests | 26.43% <3.77%> (+1.85%) |
:arrow_up: |
| systests | 24.31% <3.77%> (-0.02%) |
:arrow_down: |
| unittests | 72.84% <86.79%> (+<0.01%) |
:arrow_up: |
Flags with carried forward coverage won't be shown. Click here to find out more.
| Files | Coverage Δ | |
|---|---|---|
| ...org/apache/pulsar/broker/ServiceConfiguration.java | 99.39% <100.00%> (+<0.01%) |
:arrow_up: |
| .../java/org/apache/pulsar/broker/web/WebService.java | 94.21% <100.00%> (+0.06%) |
:arrow_up: |
| ...e/pulsar/broker/web/RestEndpointMetricsFilter.java | 85.71% <85.71%> (ø) |
@dao-jun I'm trying to find a more elegant way to obtain the path template in Jersey DEV mailing list: https://www.eclipse.org/lists/jersey-dev/msg00370.html
@dao-jun Ping me when you the PR is ready to continue review.
@asafm I've updated the PR, PTAL
@dragosvictor Could you please take a look that why my test keeps failing?