-
Notifications
You must be signed in to change notification settings - Fork 801
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
Feature request - public registry._names_to_collectors
access
#1071
Comments
Related to - airtai/faststream#1921 |
Is it not sufficient to call My concern with adding that function is that not all registries are instances of |
To clarify - we just want to avoid double metrics registration counter_name = "..."
counter = (
registry._names_to_collectors.get(counter_name)
) or Counter(
name=counter_name,
...
registry=registry,
) https://github.com/airtai/faststream/blob/main/faststream/prometheus/container.py#L40 |
Well, seems like we can't create any metric with custom https://github.com/prometheus/client_python/blob/master/prometheus_client/metrics.py#L132 So, the initial point about |
|
Now we are working on Prometheus support in FastStream and faced with a problem. Shared registry between different middlewares leads to MetricsContainer duplication. So, we would like to have a public API to chech registry for already registered objects.
Can you please provide public access to this property some way?
https://github.com/prometheus/client_python/blob/master/prometheus_client/registry.py#L31
I think, the easiest way to save old API and provide us with a new one - add a public property like in the following snipper
The text was updated successfully, but these errors were encountered: