demo: Demonstration of Application Insights

View source: R/demo.R

demoR Documentation

Demonstration of Application Insights

Description

Launches a simple demonstration of using Application Insights for Shiny apps. Requires that you have a Microsoft Azure Application Insights resource to send to; demonstration will still work – your metrics will just be sent to oblivion.

Usage

demo(
  connectionString,
  debug = TRUE,
  appId = "Test AzureAppInsights",
  launch.browser = FALSE,
  instrumentationKey
)

Arguments

connectionString, instrumentationKey

Credentials for sending to Application Insights. See arguments for config.

debug

Logical, see startAzureAppInsights.

appId

A id for this particular application.

launch.browser

Logical, see runApp.

Details

It may take some minutes before the values sent to Application Insights are visible in the logs on portal.azure.com.

If neither connectionString nor instrumentationKey is provided, a connection string is found in the environment variable AAI_CONNSTR.

Examples

connstr <- paste0(
  'InstrumentationKey=00000000-0000-0000-0000-000000000000;',
  'IngestionEndpoint=https://northeurope-0.in.applicationinsights.azure.com/;',
  'LiveEndpoint=https://northeurope.livediagnostics.monitor.azure.com/')
## Not run: 
 demo(connstr)

## End(Not run)

AzureAppInsights documentation built on July 9, 2023, 7:23 p.m.