shinyapps.io captures and provides a variety of metrics to help you gain insight into the use of your applications and your account in general. The metrics include active hours by application, number of connections, CPU, memory and network usage, and the number of worker processes.
Account metrics are viewable within the shinyapps.io dashboard under Account -> Usage. The default view is the number of hours used in the current subscription cycle, with a breakdown of the applications used and their contribution to the active hours. You can change the date ranges by using the drop down to select: 1 Day, 1 Week, 1 Month, or 3 month views.
Each application’s metrics are available under the Metrics tab within the application’s view on the shinyapps.io dashboard.
Many of the metrics described here are available for download as a dataframe through the use of the
## Example of loading user cpu metrics
df <- rsconnect::showMetrics("container.cpu",c("cpu.user"), server="shinyapps.io")
A list of the available application metrics can be found in this section of the user's guide.
Tracking user/session information
Every new browser that accesses an application will create a user session. The client data and user information (if it is an authenticated user) are accessible within your shiny application and can be logged to third party data stores (databases, log aggregation services, or web analytics platforms) as your needs require.
For authenticated applications, user name information is accessible through the
session$user variable and can be used to customize your application’s behavior. If you are interested in customizing your application based on the identity of the user, checkout the user permissions article on the shiny developer center
shinyapps.io metrics are aggregated using mean, based on the time range of the graph, which may not be be ideal in all cases. However, you could access the raw metrics yourself via the rsconnect package, as described in this section of the users' guide: http://docs.rstudio.com/shinyapps.io/metrics.html, and graph them as you prefer.