mirror of
https://github.com/github/awesome-copilot.git
synced 2026-02-24 04:15:14 +00:00
Add appinsights-instrumentation skill
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
@description('Location for all resources')
|
||||
param location string = resourceGroup().location
|
||||
|
||||
@description('Name for new Application Insights')
|
||||
param name string
|
||||
|
||||
// Create Log Analytics Workspace
|
||||
resource logAnalyticsWorkspace 'Microsoft.OperationalInsights/workspaces@2022-10-01' = {
|
||||
name: '${name}-workspace'
|
||||
location: location
|
||||
properties: {
|
||||
sku: {
|
||||
name: 'PerGB2018'
|
||||
}
|
||||
retentionInDays: 30
|
||||
}
|
||||
}
|
||||
|
||||
// Create Application Insights
|
||||
resource applicationInsights 'Microsoft.Insights/components@2020-02-02' = {
|
||||
name: name
|
||||
location: location
|
||||
kind: 'web'
|
||||
properties: {
|
||||
Application_Type: 'web'
|
||||
WorkspaceResourceId: logAnalyticsWorkspace.id
|
||||
}
|
||||
}
|
||||
|
||||
output connectionString string = applicationInsights.?properties.ConnectionString
|
||||
Reference in New Issue
Block a user