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

Re: Monitoring / logging usage of your apps

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
Highlighted
Microsoft
Microsoft

Re: Monitoring usage of your apps

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

Highlighted
Microsoft
Microsoft

Re: Monitoring / logging usage of your apps

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

Highlighted
Advocate II
Advocate II

Re: Monitoring / logging usage of your apps

That's awesome @AengusHeaney  - thanks

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (6,780)