Skip to content

Commit f2fe445

Browse files
committed
feat: connect to appinsights / open telemtry
1 parent 8d481fe commit f2fe445

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

infra/main.bicep

+13-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,8 @@ resource appInsights 'Microsoft.Insights/components@2020-02-02' = {
5757
}
5858
}
5959

60-
resource managedEnvironment 'Microsoft.App/managedEnvironments@2024-03-01' = {
60+
// https://learn.microsoft.com/en-us/azure/templates/microsoft.app/2024-10-02-preview/managedenvironments?pivots=deployment-language-bicep
61+
resource managedEnvironment 'Microsoft.App/managedEnvironments@2024-10-02-preview' = {
6162
name: managedEnvironmentName
6263
location: location
6364
tags: tags
@@ -69,6 +70,17 @@ resource managedEnvironment 'Microsoft.App/managedEnvironments@2024-03-01' = {
6970
sharedKey: workspace.listKeys().primarySharedKey
7071
}
7172
}
73+
appInsightsConfiguration: {
74+
connectionString: appInsights.properties.ConnectionString
75+
}
76+
openTelemetryConfiguration: {
77+
tracesConfiguration: {
78+
destinations: ['appInsights']
79+
}
80+
logsConfiguration: {
81+
destinations: ['appInsights']
82+
}
83+
}
7284
}
7385
}
7486

0 commit comments

Comments
 (0)