Skip to content

A prometheus collector that polls hackney connection pool stats

Notifications You must be signed in to change notification settings

kivra/prometheus_hackney_collecterl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Hackney pool metrics collector

Awkward repo name, since elexir projects doing almost the same thing already exists. Add it this way to your rebar.config dependencies (hex release might come later)

{prometheus_hackney_collector, {git, "https://github.com/kivra/prometheus_hackney_collecterl.git", {branch, "main"}}}

Make sure your application depends on hackney and prometheus in your .app file. Then use your application start callback to make prometheus know about this collector when dependencies are running.

prometheus_registry:register_collector(prometheus_hackney_collector)

Each hackney pool will expose http_client_pool_size, http_client_pool_in_use_count, http_client_pool_free_count, and http_client_pool_queue_count. These are the values returned by hackney_pool:get_stats(PoolName). To find out the pools in existance it uses a hackney internal ets table, which is something that could break in future updates to hackney.

About

A prometheus collector that polls hackney connection pool stats

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages