prometheus_client_php
prometheus_client_php copied to clipboard
High memory usage for generate metrics
Use promphp/prometheus_client_php version 2.7.1 and APCng
I am use histograms with name 'sdui_component_time_generation_bucket' and labels 'component', 'state_id'
Components count is 100
State_id count is 100
Total number of variants 100 * 100 = 10 000
Generated ~ 128 777 rows for histograms
And for response with 15.1 MB
PHP use 156 MB
I think it is because all metrics collect to one array
\Prometheus\Storage\APCng::collect
And all samples in one array
\Prometheus\Storage\APCng::collectHistograms
I think solution it is use php generator