Skip to content

Commit 4abf803

Browse files
committed
add the missing operational insight for local development
1 parent 3ae60f0 commit 4abf803

File tree

1 file changed

+24
-1
lines changed

1 file changed

+24
-1
lines changed

deploy/macae-dev.bicep

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,29 @@ resource devAoaiRoleAssignment 'Microsoft.Authorization/roleAssignments@2022-04-
6363
}
6464
}
6565

66+
resource logAnalytics 'Microsoft.OperationalInsights/workspaces@2023-09-01' = {
67+
name: format(uniqueNameFormat, 'logs')
68+
location: location
69+
tags: tags
70+
properties: {
71+
retentionInDays: 30
72+
sku: {
73+
name: 'PerGB2018'
74+
}
75+
}
76+
}
77+
78+
resource appInsights 'Microsoft.Insights/components@2020-02-02-preview' = {
79+
name: format(uniqueNameFormat, 'appins')
80+
location: location
81+
kind: 'web'
82+
properties: {
83+
Application_Type: 'web'
84+
WorkspaceResourceId: logAnalytics.id
85+
}
86+
}
87+
88+
6689
resource cosmos 'Microsoft.DocumentDB/databaseAccounts@2024-05-15' = {
6790
name: format(uniqueNameFormat, 'cosmos')
6891
location: cosmosLocation
@@ -130,4 +153,4 @@ output COSMOSDB_CONTAINER string = cosmos::autogenDb::memoryContainer.name
130153
output AZURE_OPENAI_ENDPOINT string = openai.properties.endpoint
131154
output AZURE_OPENAI_DEPLOYMENT_NAME string = openai::gpt4o.name
132155
output AZURE_OPENAI_API_VERSION string = aoaiApiVersion
133-
156+
output APPLICATIONINSIGHTS_INSTRUMENTATION_KEY string = appInsights.properties.ConnectionString

0 commit comments

Comments
 (0)