-
Notifications
You must be signed in to change notification settings - Fork 81
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
Custom Collector with sub_registry_with_prefix
outputs name multiple times
#155
Comments
You are right. Thank you for the report. I have discovered the same with https://github.com/libp2p/rust-libp2p/tree/master/misc/metrics. I have fixed this issue in #149 (not yet released). A nice side-effect is that it significantly simplifies the @allada would you mind testing with latest I am sorry for not having patched this earlier. Thanks for debugging. (Good to see the |
It looks like the entire API has changed a lot and without having non-code-based documentation that I can use it's going to be difficult to test this in our system without refactoring everything. However, you might be interested in seeing the wrappers we are using, as it might give you some ideas on API designs: Internal metrics api: Example usage: There was also a short discussion that we had here: You might be interested in the idea of a procedural macro. |
I am sorry for the trouble this causes on your end. I am not sure I am fully following. What is non-code-based documentation? How can I make your transition to the new
I am not sure how a procedural macro could simplify the |
If you create a custom Collector and attach it to a sub registry it appends the name improperly.
Results:
Expected:
The text was updated successfully, but these errors were encountered: