-
Notifications
You must be signed in to change notification settings - Fork 129
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
Configure context derived labels for all metrics #2245
Comments
Thank you for your proposal! The solution today is, as you found out, to use metric customization (just don't forget to add your new label to the The use case you are describing is totally understandable and I also think it could be awesome to have a better API for this than forcing users to re-define every metrics. That being said, we have to be very careful about it here, since this plugin is actually exists in different variants, each one based on the previous one:
If we want to add global labels applied to every metrics, we also to take in account these other variants, so every metrics actually get the label, not only the Envelop ones. |
After some discussion, we definitely want to have this feature 🙂 But we will probably not tackle this immediately. If you want, PR are very welcome and we are here to help if you have any questions or need any guidance. We can even offer to open a channel in our private slack, this way we could continue to discus about your use case in a more confidential environment 🙂 |
Awesome, thanks!
🙏 posted this before testing, good eye!
Ack, we're using through Yoga, but I wasn't familiar with the Mesh plugin. Will take a look
I'm a bit slammed right now but could probably put up a PR in a week or two |
Is your feature request related to a problem? Please describe.
Users may wish to apply some labels to all metrics based on the specific request context -- for example, a server that acts as a backend for multiple front-end clients may wish to label metrics according to the client type.
RIght now, the best way that I can see to do this is to provide
createHistogram
/createSummary
/createCounter
functions for each metric collected, ex:Describe the solution you'd like
It would be nice if there were a configuration option on the plugin that allowed the user to provide a function that takes the context and returns some labels.
Describe alternatives you've considered
It's possible that I'm missing something that allows one to do this already. If so, apologies.
Additional context
The text was updated successfully, but these errors were encountered: