You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Support MultiProcessCollector in RestrictedRegistry. (#1150)
* Support MultiProcessCollector in RestrictedRegistry.
This change makes it so that the RestrictedRegistry will always attempt to collect metrics from a collector for which it couldn’t find any metrics name. Although this can be used generally, this is meant to be used with MultiProcessCollector.
This changes the current behavior of the code but should be somehow safe as it enables filtering in case where it was not working previously. If this is an issue, an alternative approach with an explicit flag could be used (set either in the MultiProcessCollector or in the registry).
The intent here is to allow collecting a subset of metrics from production fastapi servers (running in multiprocess mode). So not having to change the library usage in these servers is advantageous to have filtering work out-of-the-box with this change.
Signed-off-by: Mathias Kende <[email protected]>
* Make the new support for collectors without names be explicit.
This adds a parameters to the constructor of CollectorRegistry to allow that new behavior rather than make it be the default.
Signed-off-by: Mathias Kende <[email protected]>
* Fix comments
Signed-off-by: Mathias Kende <[email protected]>
---------
Signed-off-by: Mathias Kende <[email protected]>
0 commit comments