cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
stevegeall
Advocate II
Advocate II

Monitoring / logging usage of your apps

Not sure where to best post this message, but it's something I've been meaning to share for a while now. I wanted to keep a log of the people who have been using my apps so I added this to the App OnStart section of my apps...

 

 

 

Set(currentUser,User());

// log this user's app start
ClearCollect(colcurrentUsersUsage,Filter(SPListUsage,Email=currentUser.Email));
If(CountRows(colcurrentUsersUsage)<1,
    //Notify("countrows is 0, this must be first time starting the app");
    Set(thisAppStartCount,1);
,
    Set(thisAppStartCount,First(Sort(colcurrentUsersUsage,ID,SortOrder.Descending)).AppStartCount+1);
);
// only keep last 10 app start times (use 9 because we add a new line after this delete)
If(CountRows(colcurrentUsersUsage)>9,
    Set(oldestUserUsageID,First(Sort(colcurrentUsersUsage,ID,SortOrder.Ascending)).ID);
    //Notify("removing ID="&oldestUserUsageID);
    Remove(SPListUsage,First(Filter(SPListUsage,ID=oldestUserUsageID)))
);

Collect(SPListUsage,
    {
        FullName: currentUser.FullName,
        Email: currentUser.Email,
        AppStartTime: Now(),
        AppStartCount: thisAppStartCount,
        AppVersion: ComponentVersion.versionValue
    }
);
// end log entry

 

 

 

As you can see it writes an entry to a SharePoint list (SPListUsage in the above example), capturing:

  • Name
  • Email
  • Start time
  • Start count
  • Version

(keeping only the most recent 10 times the person has started the app)

And of course, it first requires connecting to a SharePoint list with at least those 5 columns

 

It has been handy for me to see who is using the apps, and sometimes (for debugging) to see which version of the app they had started at each particular time.

 

Anyway, someone might find that handy ... or not 🙂

 

 

Cheers,

Steve.

1 ACCEPTED SOLUTION

Accepted Solutions
AengusHeaney
Microsoft
Microsoft

Have you considered logging this information to Application Insights - you can read my blog / docs articles here. With a couple of lines of code you can capture who is using your app, from where and on what devices/versions etc along with user flows through your app, screen performance and lots more. https://powerapps.microsoft.com/en-us/blog/log-telemetry-for-your-apps-using-azure-application-insig... and https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/application-insights

View solution in original post

3 REPLIES 3
JisungHan
Microsoft
Microsoft

Hi @stevegeall ,

 

I appreciate you sharing the good experience for monitoring usage of PowerApps. It would be very helpful for who needs those monitoring behavior. 😄

 

Here I want to add one more tool that the MS Product team released named "Monitoring Tool": https://powerapps.microsoft.com/en-us/blog/introducing-monitor-to-debug-apps-and-improve-performance...

 

This monitoring tool allow to catch all the events and HTTP requests/responses for troubleshooting purpose:

 

image.pngimage.png

 

Currently, this is available for Canvas app within Studio inside but it would be wider as below:

 

1. Canvas app within Studio (currently available)

2. Canvas app in Web player within the same browser and user account (Future release)

3. Canvas app and the admin can invite a user to the monitoring session if the issue only happens on a specific user side only (Future release)

4. Considering to adding it on Model driven app (Future consideration)

 

Hope this helps.

 

Best regards,

Jisung Han

AengusHeaney
Microsoft
Microsoft

Have you considered logging this information to Application Insights - you can read my blog / docs articles here. With a couple of lines of code you can capture who is using your app, from where and on what devices/versions etc along with user flows through your app, screen performance and lots more. https://powerapps.microsoft.com/en-us/blog/log-telemetry-for-your-apps-using-azure-application-insig... and https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/application-insights

View solution in original post

That's awesome @AengusHeaney  - thanks

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Carousel April Dunnam Updated 768x460.jpg

Urdu Hindi D365 Bootcamp

Dont miss our very own April Dunnam’s The Developer Guide to the Galaxy! Find out what the Power Platform has to offer for the traditional developer.

Top Solution Authors
Top Kudoed Authors
Users online (2,502)