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?
Thank you all in advance,
– Thomas