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. This is meant to be used with MultiProcessCollector (but there is no strong reason to limit it to that one).
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 itself).
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.
@csmarchbanks let me know what you think.
Thanks
@csmarchbanks do you know if you will be able to review this? If you agree with the idea but would prefer a different implementation, I’m happy to rewrite that differently.
Hello! I am out of town for another week but will review this after I return. In the meantime it looks like the DCO check is failing.