Skip to content

Produce metric for max thread pool size#319

Merged
brian-brazil merged 4 commits intoprometheus:masterfrom
tommy-bo:master
Dec 1, 2017
Merged

Produce metric for max thread pool size#319
brian-brazil merged 4 commits intoprometheus:masterfrom
tommy-bo:master

Conversation

@tommy-bo
Copy link
Copy Markdown
Contributor

@tommy-bo tommy-bo commented Dec 1, 2017

To be able to measure and alert on capacity

QueuedThreadPool::getIdleThreads),
buildGauge("jetty_queued_thread_pool_jobs", "Number of total jobs",
QueuedThreadPool::getQueueSize),
buildGauge("jetty_queued_thread_pool_max", "Max size of thread pool",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I don't think you've got the right function.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I think you're right 🤦‍♂️

buildGauge("jetty_queued_thread_pool_jobs", "Number of total jobs",
QueuedThreadPool::getQueueSize));
QueuedThreadPool::getQueueSize),
buildGauge("jetty_queued_thread_pool_max", "Max size of thread pool",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

threads_max would seem more in line with the above metrics

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Perhaps. Or would size be more appropriate?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'd say that it's implicit that it's the maximum size of the threadpool, there's nothing else it can really be the max of.

@brian-brazil brian-brazil merged commit 1a8bf7d into prometheus:master Dec 1, 2017
@brian-brazil
Copy link
Copy Markdown
Contributor

Thanks!

@tommy-bo
Copy link
Copy Markdown
Contributor Author

tommy-bo commented Dec 2, 2017

Thanks for your time, much obliged :-)

@MouadBenchchaoui0000
Copy link
Copy Markdown

Sorry if this the wrong channel to ask, but I am wondering why this is done for jdk8 only and simpleclient_jetty? we are more interested in the thread pool metrics but I am not sure which to use.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants