Thanks a lot Fabian, will check out and get back to you. On Friday, 7 October, 2022 at 3:35:28 pm UTC+5:30 [email protected] wrote:
> Hi, > > Funny, I commented the same idea of having two separate registries on > https://github.com/prometheus/client_java/issues/815 this morning. > > Currently you would just register each metric with two registries manually > > errorLevelRegistry.register(myCounter); > debugLevelRegistry.register(myCounter); > > I'm not sure whether it's worthwhile to create API in client_java for > making this a one-liner. Writing a custom method for this is just 4 lines > of code. > > Fabian > > On Fri, Oct 7, 2022 at 11:43 AM Matthias Rampke <[email protected]> > wrote: > >> > Say, If we write a wrapper on top of prometheus java client API, its >> going to be messy >> >> You can make it relatively clean by creating (and incrementing) all the >> metrics, but only calling .register() on those that you want to expose in >> the given environment. >> >> Even more elaborately, you could have separate CollectorRegistry >> instances, and register each metric with the one(s) appropriate for its >> level. I think as it is, you will have to register "normal" level metrics >> with both the "normal" and "debug" CollectorRegistry. >> >> I wonder (@fstab?) if it would make sense to have a >> CollectorRegistryCollector, so that in effect you could do >> `normalRegistry.register(debugRegistry)` and then decide when setting up >> the Exporter which registry to serve, because all the "normal" metrics are >> indirectly automatically registered with the debug registry. Or maybe that >> exists and I couldn't find it? >> >> /MR >> >> >> On Fri, Oct 7, 2022 at 3:09 AM Muthuveerappan Periyakaruppan < >> [email protected]> wrote: >> >>> Hi Team, >>> >>> we have a situation , where we have 8 to 15 million head series in each >>> Prometheus and we have 7 instance of them (federated). Our prometheus are >>> in a constant flooded situation handling the incoming metrics and back end >>> recording rules. >>> >>> One thought which came to was - do we have something similar to log >>> level for prometheus metrics ? If its there then... we can benefit from it >>> .... by configuring to run all targets in error level in production and in >>> debug/info level in development... This will help control flooding of >>> metrics. >>> >>> Say, If we write a wrapper on top of prometheus java client API, its >>> going to be messy - hence wanted to check if this request makes sense or is >>> there any other way out ? >>> >>> Let me know your thoughts how this can be achieved .... Really need to >>> hear from others on how this sort of situation is handled and whats the way >>> to tackle ... >>> >>> fyr - We have raised the same issue @ prometheus java client project - >>> https://github.com/prometheus/client_java/issues/815 >>> >>> >>> Many Thanks >>> Muthuveerappan >>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "Prometheus Users" 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-users/d3a1bb24-2d87-48c0-8b01-9f91a71dff7bn%40googlegroups.com >>> >>> <https://groups.google.com/d/msgid/prometheus-users/d3a1bb24-2d87-48c0-8b01-9f91a71dff7bn%40googlegroups.com?utm_medium=email&utm_source=footer> >>> . >>> >> -- >> You received this message because you are subscribed to the Google Groups >> "Prometheus Users" 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-users/CAMV%3D_gbgV5qmQmRVmqdkDuFx2gymz_vWjzxeK0h8oLfUgV51%3Dg%40mail.gmail.com >> >> <https://groups.google.com/d/msgid/prometheus-users/CAMV%3D_gbgV5qmQmRVmqdkDuFx2gymz_vWjzxeK0h8oLfUgV51%3Dg%40mail.gmail.com?utm_medium=email&utm_source=footer> >> . >> > -- You received this message because you are subscribed to the Google Groups "Prometheus Users" 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-users/4a7dd007-6311-48d5-9858-f6f49942163en%40googlegroups.com.

