| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
@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. |
Sorry, something went wrong.
|
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. |
Sorry, something went wrong.
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 <mathias.kende@mistral.ai>
There was a problem hiding this comment.
Giving this some more thought I think it would be good to have an opt in for this feature. If any existing users have registries without names that suddenly started having .collect() called on them that could introduce significant performance issues. Just an optional argument about supporting collectors without names to __init__ would be good enough I think.
Sorry, something went wrong.
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 <mathias.kende@mistral.ai>
|
Thanks, I added the explicit flag. Please take another look. |
Sorry, something went wrong.
Signed-off-by: Mathias Kende <mathias.kende@mistral.ai>
|
Thanks, please take another look. |
Sorry, something went wrong.
There was a problem hiding this comment.
Thanks!
Sorry, something went wrong.
|
Thanks for the review @csmarchbanks! Would you be so kind as to cut a new release with this? |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
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