Skip to content

Commit 014e44c

Browse files
authored
Merge pull request #109161 from mrbullwinkle/mrb_03_26_2020_snapshot_ARM
add engineering's ARM template example to doc
2 parents bebd91d + 1796351 commit 014e44c

File tree

1 file changed

+43
-1
lines changed

1 file changed

+43
-1
lines changed

articles/azure-monitor/app/snapshot-debugger-appservice.md

Lines changed: 43 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Enable Snapshot Debugger for .NET apps in Azure App Service
44
ms.topic: conceptual
55
author: brahmnes
66
ms.author: bfung
7-
ms.date: 03/07/2019
7+
ms.date: 03/26/2019
88

99
ms.reviewer: mbullwin
1010
---
@@ -42,6 +42,48 @@ Application Insights Snapshot Debugger is pre-installed as part of the App Servi
4242
Follow the same steps as for **Enable Snapshot Debugger**, but switch both switches for Snapshot Debugger to **Off**.
4343
We recommend that you have Snapshot Debugger enabled on all your apps to ease diagnostics of application exceptions.
4444

45+
## Azure Resource Manager template
46+
47+
For an Azure App Service, you can set app settings in an Azure Resource Manager template to enable Snapshot Debugger and Profiler. You add a config resource that contains the app settings as a child resource of the website:
48+
49+
```json
50+
{
51+
"apiVersion": "2015-08-01",
52+
"name": "[parameters('webSiteName')]",
53+
"type": "Microsoft.Web/sites",
54+
"location": "[resourceGroup().location]",
55+
"dependsOn": [
56+
"[variables('hostingPlanName')]"
57+
],
58+
"tags": {
59+
"[concat('hidden-related:', resourceId('Microsoft.Web/serverfarms', variables('hostingPlanName')))]": "empty",
60+
"displayName": "Website"
61+
},
62+
"properties": {
63+
"name": "[parameters('webSiteName')]",
64+
"serverFarmId": "[resourceId('Microsoft.Web/serverfarms', variables('hostingPlanName'))]"
65+
},
66+
"resources": [
67+
{
68+
"apiVersion": "2015-08-01",
69+
"name": "appsettings",
70+
"type": "config",
71+
"dependsOn": [
72+
"[parameters('webSiteName')]",
73+
"[concat('AppInsights', parameters('webSiteName'))]"
74+
],
75+
"properties": {
76+
"APPINSIGHTS_INSTRUMENTATIONKEY": "[reference(resourceId('Microsoft.Insights/components', concat('AppInsights', parameters('webSiteName'))), '2014-04-01').InstrumentationKey]",
77+
"APPINSIGHTS_PROFILERFEATURE_VERSION": "1.0.0",
78+
"APPINSIGHTS_SNAPSHOTFEATURE_VERSION": "1.0.0",
79+
"DiagnosticServices_EXTENSION_VERSION": "~3",
80+
"ApplicationInsightsAgent_EXTENSION_VERSION": "~2"
81+
}
82+
}
83+
]
84+
},
85+
```
86+
4587
## Next steps
4688

4789
- Generate traffic to your application that can trigger an exception. Then, wait 10 to 15 minutes for snapshots to be sent to the Application Insights instance.

0 commit comments

Comments
 (0)