Hi Sidath, histograms have a limited number of buckets, they should not grow indefinitely.
The reason for your OOM might be "cardinality explosion": Maybe you generate more and more different label values, each set of label values adds a new histogram. If this is not the case, and you see increasing memory usage with a fixed set of histograms, please open an issue on https://github.com/prometheus/client_java, ideally with a way to reproduce this. Fabian On Tue, Oct 17, 2023 at 1:31 PM 'Sidath Weerasinghe' via Prometheus Developers <[email protected]> wrote: > Hi Team, > > I have written a custom java Prometheus Exporter to export API traffic > details such as API name, version, consumer name, response latency, status > code, and many metadata. For this, I have used counters and histograms. > With the heavy traffic in production, I'm getting OOM on the client side > because of this huge amount of histogram object size. > Prometheus pulls the data in every 3s from the client. > > Do you have any other solution for this? > > > Thank you > > -- > You received this message because you are subscribed to the Google Groups > "Prometheus Developers" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/prometheus-developers/76bc4885-181c-46eb-9a9c-03c466607f21n%40googlegroups.com > <https://groups.google.com/d/msgid/prometheus-developers/76bc4885-181c-46eb-9a9c-03c466607f21n%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "Prometheus Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-developers/CAPX310h8FzFcRW5QhRPR36akeGAE1EK_C4Yizx%2B0rtikgEkUmQ%40mail.gmail.com.

