PromPHP / prometheus_client_php

Prometheus instrumentation library for PHP applications
https://prometheus.io/docs/concepts/metric_types/
Apache License 2.0
415 stars 91 forks source link

High memory usage for generate metrics #132

Open Enotze opened 10 months ago

Enotze commented 10 months ago

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' image Components count is 100 State_id count is 100 Total number of variants 100 * 100 = 10 000 Generated ~ 128 777 rows for histograms image And for response with 15.1 MB image

PHP use 156 MB image

I think it is because all metrics collect to one array \Prometheus\Storage\APCng::collect image

And all samples in one array \Prometheus\Storage\APCng::collectHistograms image

I think solution it is use php generator