pulsar icon indicating copy to clipboard operation
pulsar copied to clipboard

[feat][monitor] PIP-223: Add metrics for all rest endpoints.

Open dao-jun opened this issue 1 year ago • 1 comments

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

dao-jun avatar Dec 20 '23 20:12 dao-jun

refers to: https://github.com/apache/pulsar/pull/18836

dao-jun avatar Dec 20 '23 20:12 dao-jun

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

Impacted file tree graph

@@             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%> (ø)

... and 74 files with indirect coverage changes

codecov-commenter avatar Feb 29 '24 13:02 codecov-commenter

@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

asafm avatar Mar 10 '24 10:03 asafm

@dao-jun Ping me when you the PR is ready to continue review.

asafm avatar Mar 10 '24 13:03 asafm

@asafm I've updated the PR, PTAL

dao-jun avatar Mar 11 '24 12:03 dao-jun

@dragosvictor Could you please take a look that why my test keeps failing?

dao-jun avatar Mar 12 '24 18:03 dao-jun