Open lswith opened 6 years ago
This might happen because of collectors autodiscovery. To check that you can configure collectors list manually (note default alias) https://github.com/deadtrickster/prometheus.erl#configuration
I love the quick response!
I've actually set the default_collectors to an empty list to test the boot time performance and its still very similar.
So, setting the instrumenters to an empty list as well as the collectors solved the boot time issue. Any ideas what might be the reason for this?
Not sure, what you mean by instrumenters?
you can configure config :prometheus, instrumenters: []
.
I think the issue might be in this module: https://github.com/deadtrickster/prometheus.erl/blob/master/src/prometheus_misc.erl
Getting the default instrumenters seems very slow.
I'm just curious what the default instrumenters are? if I wanted to set this configuration to the default, what would it be?
hmm looks like this is a leftover from the past, I was trying to automate instrumenters set up like declaring metrics, but due interactive/embedded mode differences it's not possible to do that reliably. As a temporary fix please add instrumenters: [] to the prometheus config. I'll remove it entirely I think.
Any progress on optimising this? The module_info
spam is still causing 9 seconds of startup time for me, a bit annoying for a fast TDD cycle when tests take so long to start
Context: I've added the prometheus_ex library to my phoenix application. When I do this, my mix tasks and overall boot time for the whole application has gone up by a minute. I've started trying to determine where this occurs, and it's definitely happening the moment this application is added to the supervision tree.
Any thoughts on how I can improve runtime boot time?