-
Notifications
You must be signed in to change notification settings - Fork 4
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
How do I register custom metrics? #73
Comments
I think what I am asking is more probably how do I add custom metrics that will be exporter by axum-otel-metrics in general. I'm stuck and I'm not sure how to do this. The documentation does not mention this. |
I also tried this:
but nothing seems to have happened. Metrics are not served, despite me initializing the struct, and calling the |
Oh mang, I got it to work! Thanks for your software. |
I've tried
but these metrics aren't getting registered in the registry that the HttpMetricsLayerBuilder creates and assigns to the HttpMetricsLayer my system uses.
How do I obtain a reference to the registry such that my code can use
register_int_counter_vec_with_registry
? Alternatively, how do I instruct the HttpMetricsLayerBuilder to use the default prometheus crate registry?Thanks in advance.
The text was updated successfully, but these errors were encountered: