App Insight - Log Analytics - Query User And Session Data

Mukherjee, Sirsendu 41 Reputation points
2022-05-09T15:11:28.22+00:00

Hello MS Team,

I have my Web application deployed on App Service Plan/Web App and have enabled Application Insight (attached to Log Analytics Workspace) for same. I have a requirement of getting below specific data for user/session. Can someone help me with what specific metric filter I need to apply in Application Insight (OR) if you can provide me the KQL query for same. That would be real helpful.

Requirement:

I would like to see by user, per day, per hour how many times did they access the application (or) how much time did they spend per day in application (or) how many clicks/operations they performed?

Thank You.

Azure Monitor
Azure Monitor
An Azure service that is used to collect, analyze, and act on telemetry data from Azure and on-premises environments.
2,740 questions
0 comments No comments
{count} votes

Accepted answer
  1. SwathiDhanwada-MSFT 17,136 Reputation points
    2022-05-16T12:01:16.937+00:00

    @Mukherjee, Sirsendu Thanks for reaching out. Here are some of the kusto examples that can help you retrieve the information about clicks and session data.

    • Below provides information number of clicks segregated by an hour. pageViews
      | where timestamp >= ago(24h)
      | summarize totalclicks=count() by user_Id , session_Id , name, bin(timestamp,1h)
      | order by timestamp desc
    • Below kusto provides information of distinct sessions segregated by day pageViews
      | where timestamp >= ago(7d)
      | summarize dcount(session_Id) , totalclicks=count() by user_Id , name , bin(timestamp,1d)

    Reference Documents:

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful