Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Azure Functions Logging to Application Insights
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
...
},
"variables": {
...
},
"resources": [
// Application Insights
{
"type": "Microsoft.Insights/components",
"apiVersion": "2014-04-01",
...
// Set the "kind" value to "other", which is "General".
"kind": "other",
...
},
// Function App
{
"type": "Microsoft.Web/sites",
"apiVersion": "2015-08-01",
...
// Set the "kind" value to "functionapp"
"kind": "functionapp",
...
"resources": [
{
"type": "config",
"apiVersion": "2015-08-01",
// Set the "AppSettings" section
"name": "appsettings",
"properties": {
...
// Set the Instrumentation Key directly within ARM template
"APPINSIGHTS_INSTRUMENTATIONKEY": "[reference(resourceId('Microsoft.Insights/components', variables('applicationInsightsName')), '2014-04-01').InstrumentationKey]",
...
}
}
],
...
}
],
"outputs": {}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment