question

MukherjeeSirsendu-1074 avatar image
0 Votes"
MukherjeeSirsendu-1074 asked SwathiDhanwada-MSFT commented

App Insight - Log Analytics - Query User And Session Data

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
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

SwathiDhanwada-MSFT avatar image
1 Vote"
SwathiDhanwada-MSFT answered SwathiDhanwada-MSFT commented

@MukherjeeSirsendu-1074 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:

· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thank You @SwathiDhanwada-MSFT . That helped. You can please mark this thread as resolved/answered.

0 Votes 0 ·
SwathiDhanwada-MSFT avatar image SwathiDhanwada-MSFT MukherjeeSirsendu-1074 ·

@MukherjeeSirsendu-1074 Glad to know it has helped. Kindly "Accept Answer" and Up-Vote it so that it would be beneficial for the customers who are facing similar issues. Thank you.

0 Votes 0 ·