deadtrickster / prometheus.erl

Prometheus.io client in Erlang
MIT License
341 stars 117 forks source link

Add processes collector #58

Open deadtrickster opened 7 years ago

deadtrickster commented 7 years ago

Based on process_info, aggregated by application.

application:get_application to get application of Pid (leader actually, but anyway).

TODO list of metrics

deadtrickster commented 7 years ago

It actually might be a good idea to separate data collection from rendering. Properly structuring information about 200_000-300_000 processes takes 1-2 seconds on my VM, so it shouldn't be done synchronously when collecting all metrics. A process with configurable interval writes to ETS.,,

OTOH processing 200_000 raises CPU usage to 20%(of one core) here. Which is a lot.