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
Question - Is it possible to disable scope prefix and sufix added to metric name? #502
Comments
@CarlosPanarello , there's no way currently to disable this. There was some discussion, not that long ago, about letting implementations choose their metric name prefix, which would make metrics from MicroProfile fit better in a list of metrics amongst metrics from multiple products. eg. prefix all Open Liberty metrics with liberty_ . I still think that's a worthwhile idea. Are you looking for adding a different prefix, or just getting rid of the scope prefix? |
Just getting rid of it. |
@CarlosPanarello , can you say a bit about why you want to remove the prefix? I see a couple of issues with that, but if I get what you want to accomplish I can try to think of ideas. A problem with just getting rid of the prefix is that there are 3 separate metrics registries (base, vendor, application), each with its own namespace. Getting rid of it adds the possibility of a name collision. While that may be unlikely it does make us need to somehow deal with what would happen if there was a collision. The other problem with having no prefix is runtimes typically start their metric names with their product name (see #384). Removing the prefix would cause all of the MP metrics to be spread across the alphabet of names, intermixed with better behaved metrics groups from individual products. In #384 we were talking about adding an "mp_" prefix to the metric names so that they show up together in Prometheus/Grafana when you're trying to create dashboards. |
We have a heterogeneous ecosystem with services in multiple languages (Java, Go, TypeScript, Python...), and have agreed on a subset of metrics with standardized names (described here) to leverage already built grafana panels, alerts... |
I'm personally in favor of getting rid of the prefixes now. I see why that's annoying in a world that isn't so MP-centric. Better to have names that start with the component they come from. |
@donbourne Can we get rid of the prefix |
@june805 , we're getting rid of the |
The scope prefix has been removed in MP Metrics v5.0, so I would consider that part of this issue to be addressed. The Please feel free to reopen, with comments, if you think this one hasn't been addressed properly. |
In the metric name is added the scope prefix like application, base or vendor and for counter metrics is added _total in the end of the metric name.
Is there any way to disable this?
The text was updated successfully, but these errors were encountered: