Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

\Prometheus\CollectorRegistry::getMetricFamilySamples uses a large amount of memory #141

Open
skyellin opened this issue Dec 15, 2023 · 0 comments

Comments

@skyellin
Copy link

\Prometheus\CollectorRegistry::getMetricFamilySamples, and the functions it uses, needs to store the entire output in memory. This can grow quite large for applications with a lot of metrics and high cardinality. It seems that it would be possible to avoid keeping all the output in memory, by having \Prometheus\CollectorRegistry::getMetricFamilySamples (and its dependecies) return a generator rather than an array.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant