cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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
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
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

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
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

Top Solution Authors
Top Kudoed Authors
Users online (78,095)