Skip to content
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

[enh][monitor]: add metrics for pulsar web service thread pool #14742

Merged
merged 17 commits into from
Apr 19, 2022

Conversation

tjiuming
Copy link
Contributor

Fixes #14459

Motivation

See the issue

Modifications

  1. Add WebExecutorStats to record web thread pool metrics

Does this pull request potentially affect one of the following parts:

If yes was chosen, please highlight the changes

  • Dependencies (does it add or upgrade a dependency): (no)
  • The public API: (no)
  • The schema: (no)
  • The default values of configurations: (no)
  • The wire protocol: (no)
  • The rest endpoints: (no)
  • The admin cli options: (no)
  • Anything that affects deployment: (no)

Documentation

Check the box below or label this PR directly (if you have committer privilege).

Need to update docs?

  • doc-required

    (If you need help on updating docs, create a doc issue)

  • no-need-doc

    (Please explain why)

  • doc

    (If this PR contains doc changes)

@github-actions github-actions bot added the doc-required Your PR changes impact docs and you will update later. label Mar 18, 2022
@tjiuming
Copy link
Contributor Author

this pr add following metrics:

name type description
pulsar_web_executor_max_threads GAUGE The max threads of pulsar-web thread pool
pulsar_web_executor_min_threads GAUGE The max threads of pulsar-web thread pool
pulsar_web_executor_idle_threads GAUGE The idle threads of pulsar-web thread pool
pulsar_web_executor_active_threads GAUGE The active-threads(doing task) of pulsar-web thread pool
pulsar_web_executor_current_threads GAUGE How many threads in the pulsar-web thread pool now

fix checkstyle
@codelipenghui
Copy link
Contributor

@tjiuming Thanks for the great contribution, this PR will bring more transparency to the web service thread pool. Please help open another PR to add the documentation.

@codelipenghui codelipenghui added this to the 2.11.0 milestone Mar 18, 2022
@codelipenghui codelipenghui changed the title [Broker] pulsar web executor metrics [enh][monitor]: Add metrics for pulsar web service thread pool Mar 18, 2022
@codelipenghui codelipenghui changed the title [enh][monitor]: Add metrics for pulsar web service thread pool [enh][monitor]: add metrics for pulsar web service thread pool Mar 18, 2022
@codelipenghui codelipenghui added type/enhancement The enhancements for the existing features or docs. e.g. reduce memory usage of the delayed messages area/metrics labels Mar 18, 2022
tjiuming and others added 2 commits March 18, 2022 16:57
@Anonymitaet Anonymitaet added doc-complete Your PR changes impact docs and the related docs have been already added. and removed doc-required Your PR changes impact docs and you will update later. labels Mar 21, 2022
merge master to dev/jetty_threadpool_metrics
Copy link
Contributor

@gaoran10 gaoran10 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@frankjkelly
Copy link
Contributor

Bump - I'm excited for this - any chance the conflicts can get resolved?

…jetty_threadpool_metrics

� Conflicts:
�	pulsar-broker/src/main/java/org/apache/pulsar/broker/web/WebService.java
@tjiuming
Copy link
Contributor Author

Bump - I'm excited for this - any chance the conflicts can get resolved?

Resolved

@codelipenghui codelipenghui merged commit 32d7a51 into apache:master Apr 19, 2022
Nicklee007 pushed a commit to Nicklee007/pulsar that referenced this pull request Apr 20, 2022
…e#14742)

Fixes apache#14459

### Motivation

See the issue

### Modifications
1. Add WebExecutorStats to record web thread pool metrics
@tjiuming tjiuming deleted the dev/jetty_threadpool_metrics branch May 10, 2022 07:00
codelipenghui pushed a commit that referenced this pull request May 20, 2022
Fixes #14459

See the issue

1. Add WebExecutorStats to record web thread pool metrics

(cherry picked from commit 32d7a51)
codelipenghui pushed a commit that referenced this pull request May 20, 2022
Fixes #14459

See the issue

1. Add WebExecutorStats to record web thread pool metrics

(cherry picked from commit 32d7a51)
nicoloboschi pushed a commit to datastax/pulsar that referenced this pull request May 23, 2022
…e#14742)

Fixes apache#14459

See the issue

1. Add WebExecutorStats to record web thread pool metrics

(cherry picked from commit 32d7a51)
(cherry picked from commit f682e10)
nicoloboschi pushed a commit to datastax/pulsar that referenced this pull request May 23, 2022
…e#14742)

Fixes apache#14459

See the issue

1. Add WebExecutorStats to record web thread pool metrics

(cherry picked from commit 32d7a51)
(cherry picked from commit a6eb622)
@mattisonchao mattisonchao added the cherry-picked/branch-2.9 Archived: 2.9 is end of life label May 25, 2022
@BewareMyPower BewareMyPower added the cherry-picked/branch-2.8 Archived: 2.8 is end of life label Jul 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/metrics cherry-picked/branch-2.8 Archived: 2.8 is end of life cherry-picked/branch-2.9 Archived: 2.9 is end of life cherry-picked/branch-2.10 doc-complete Your PR changes impact docs and the related docs have been already added. release/2.8.4 release/2.9.3 release/2.10.1 type/enhancement The enhancements for the existing features or docs. e.g. reduce memory usage of the delayed messages
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Broker] Expose prometheus metric for current and max number of http server threads
7 participants