Loading source
Pulling the file list, source metadata, and syntax-aware rendering for this listing.
Source from repo
Instrument your web apps with Azure Application Insights for telemetry and monitoring.
Files
Skill
Size
Entrypoint
Format
Open file
Syntax-highlighted preview of this file as included in the skill package.
examples/appinsights.bicep
1@description('Location for all resources')2param location string = resourceGroup().location34@description('Name for new Application Insights')5param name string67// Create Log Analytics Workspace8resource logAnalyticsWorkspace 'Microsoft.OperationalInsights/workspaces@2022-10-01' = {9name: '${name}-workspace'10location: location11properties: {12sku: {13name: 'PerGB2018'14}15retentionInDays: 3016}17}1819// Create Application Insights20resource applicationInsights 'Microsoft.Insights/components@2020-02-02' = {21name: name22location: location23kind: 'web'24properties: {25Application_Type: 'web'26WorkspaceResourceId: logAnalyticsWorkspace.id27}28}2930output connectionString string = applicationInsights.properties.ConnectionString31