Skip to content

Instantly share code, notes, and snippets.

@justinyoo
Created June 19, 2017 06:05
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save justinyoo/6bb2b82935e70bfa005e3a287f5296d8 to your computer and use it in GitHub Desktop.
Save justinyoo/6bb2b82935e70bfa005e3a287f5296d8 to your computer and use it in GitHub Desktop.
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