On Thu, 22 Oct 2020 at 15:56, Thomas Schmidt <[email protected]> wrote:
> Hello all, > > I have the following use-case: I'm instrumenting a python codebase where > backing services (eg. Kafka, S3, HDFS, HTTP client) are injected into a > service that provides the business logic. > > In some cases there may be multiple instance of the same backing service > per service, which creates either: > * Issue with the python client, which justifiably refuses to register > metrics that already exist > * Issue with the exposition that exposes multiple instance of each metrics > (unsure if duplication exist in that case, but it seems to) > > What I would like is to have a base CollectorRegistry that can be use for > collecting lower-level metrics, but if a metric already exist, instead of > raising an exception, simply pass over it, so that multiple instances of a > backing service would report as a single set of metrics. > > Is there a simple way to achieve that using the python client currently, > and if not what are possible alternatives? > If it's the same backing service, why aren't they all using the same metric objects? Metrics are meant to be defined at the file level, which shouldn't have these problems. -- Brian Brazil www.robustperception.io -- 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/CAHJKeLoFSWT%2BBtt7-NB0JE4%2B6NO2SgfUHffuoGvqj%2B00xYC1Lw%40mail.gmail.com.

