-
Notifications
You must be signed in to change notification settings - Fork 31
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
Add extra-labels to Ring collector #4
Conversation
@psalaberria002 Thanks for addressing this! I think there might be a cleaner, more Ring-like way of doing this, namely by using a well known field (e.g. |
14e5790
to
d0f0d30
Compare
Is this closer to what you were suggesting? It gets labels (specific ns kw) from both the request and the response. I still don't like the need to define labels when calling ring/initialize. Do you know if this can be done on the fly by some middleware? |
@psalaberria002 I don't think you can add labels on-demand since collectors (and thus their labels) have to be registered before they are ever used. I don't see a way of dynamically adding/removing labels in the code or the docs. As to your implementation: Looking good! Only thing I'm uncertain about is whether |
I just wanted to be specific, since these labels are only relevant for ring metrics. Why is |
@psalaberria002 Since it's a key within a Ring request or response map I think the "only relevant for ring metrics" part is given by context. Also, But, maybe the fact that we're arguing about this shows that it's not the correct approach. How do you feel about having an additional |
Great idea! Leaving the implementation up to the user sounds more flexible. Will try to have a patch during the day. Thank you for the fast replies. |
Any updates on this one? |
I removed the |
Great! Thank you. |
Currently the default labels are [:method :status :statusClass :path].
I would like to have the ability to add extra labels from the request or response.
If this is not the right approach, do you have any other ideas for how to solve it?
Thank you.