Closed bradacina closed 9 months ago
Hi @bradacina, Application Insights azure portal requires certain metrics (auto-collected) to have fixed names. Ideally, you wouldn't want to add the same prefix to all metrics. However, you can set your own rolename so that you can group all your metrics under the same role name using metrics filter.
Under the metrics blade, you can use filtering based on the cloud role name:
Hope that helps and please let me know if that resolves your issue.
Hi @heyams . Thank you for your reply! And sorry for my late reply. I'm on UTC+1 timezone.
Yes we set role names for each of the micro services. What makes it difficult for us right now is that we already have hundreds of metrics with different names (and prefixes - see screenshots) that are grouped together, so easy to "find", but the new metrics from the jar with "standard" names are interspersed between the existing ones. We can specify the Filter after we've selected a metric. And then in the Filter you only get to see the Cloud Role Name that emits that metric ( in our case it'll be just one, because each service outputs prefixed metrics ). So the time was already "spent" looking for the correct metric and the Filter doesn't help much. It would be ideal to add Filter first, and then add Metric.
Anyway, I don't want to drag this on and waste your time. This is not a feature that is going to make a big impact. I wanted to know if there's a way to prefix the metrics that's all.
@bradacina this is a list of default metrics we collect https://github.com/microsoft/ApplicationInsights-Java/wiki/Default-Metrics-Captured-by-Java-3.0-Agent. Some of these are required by the Applicaiton Insights Azure Portal UI.
You can add prefix to all metrics using OpenTelemetry extension when 3.5 GA is released, but please note that it will break some UI if you're ok with it?
Sounds good! Thank you madam!
Is your feature request related to a problem? Please describe. We are collecting custom metrics from different micro-services and usually add a prefix to the metric names in each of these micro services so we can have them grouped together in the Metric drop down on Azure Portal (it saves time when creating dashboards; we use a single Application Insights resource for the entire Prod environment). With a new micro service that I'm building I've added the applicationInsights jar and just want to let it capture the default metrics for the time being. Is there a way to set a prefix (in applicationinsights.json or somewhere else?) to the names of all metrics that get sent to Application Insights?
Describe the solution you would like Set a "NamePrefix" property in applicationinsights.json ?
Describe alternatives you have considered Did not consider any alternatives.
Thank you in advance.