Query to Get All Metrics in Azure App Insights

user20201 346 Reputation points
2024-06-12T11:59:52.8766667+00:00

I am trying to make a query to get all metrics in Azure Application Insights logs in one run. Need some help to get all metrics details with specific Columns (Metric Name, Avg, Unique, Sum). I am trying to use "summarize" and "union" operators for all the metrics in Application Insights log analytics but getting different view and results from the desired and expected view shown in the image attached. I am new also to Kusto Query Language so appreciate help from the community.metrics

Azure Monitor
Azure Monitor
An Azure service that is used to collect, analyze, and act on telemetry data from Azure and on-premises environments.
3,330 questions
Azure
Azure
A cloud computing platform and infrastructure for building, deploying and managing applications and services through a worldwide network of Microsoft-managed datacenters.
1,027 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Mahesh Goud Juvvadi 1,395 Reputation points Microsoft Vendor
    2024-06-18T05:23:16.5533333+00:00

    Hi user20201,

    Welcome to the Microsoft Q&A forum.

    Based on your question you can customize this query by adjusting the columns, filters, and aggregation functions according to your specific requirements.

    customMetrics

    | project timestamp, name, value
    | summarize avg(value), sum(value) by name
    

    little more in detail

    pageViews
    | project session_Id, operation_Id, user_Id
    | join (
    customMetrics
    | project timestamp, name, value, user_Id, operation_Id, session_Id
    ) on session_Id
    | summarize avg(value), sum(value) by name, user_Id, session_Id
    | summarize avg(avg_value), sum(sum_value) by name, session_Id
    

    If you are still facing any issue, please let us know in the comments. We are happy to assist you.

    If the information is helpful, please accept the answer by clicking the "Upvote" and "Accept Answer" on the post.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.