@ -0,0 +1,24 @@ | |||||
{ | |||||
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", | |||||
"contentVersion": "1.0.0.0", | |||||
"parameters": { | |||||
"name": { | |||||
"type": "String" | |||||
} | |||||
}, | |||||
"variables": { | |||||
"appInsightsName": "[concat(parameters('name'), 'appinsights')]", | |||||
"appInsightsApplicationId": "parameters('name'" | |||||
}, | |||||
"resources": [ | |||||
{ | |||||
"apiVersion": "2014-08-01", | |||||
"name": "[variables('appInsightsName')]", | |||||
"type": "Microsoft.Insights/components", | |||||
"location": "[resourceGroup().location]", | |||||
"properties": { | |||||
"ApplicationId": "[variables('appInsightsApplicationId')]" | |||||
} | |||||
} | |||||
] | |||||
} |
@ -0,0 +1,9 @@ | |||||
{ | |||||
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#", | |||||
"contentVersion": "1.0.0.0", | |||||
"parameters": { | |||||
"name": { | |||||
"value": "eshop" | |||||
} | |||||
} | |||||
} |
@ -0,0 +1,19 @@ | |||||
# Deploying Azure Application Insights | |||||
The ARM template `applicationinsights.json` and its parameter file (`applicationinsights.parameters.json`) are used to deploy Azure Application Insights | |||||
## Deploy the template | |||||
Once parameter file is edited you can deploy it using [create-resources script](../readme.md). | |||||
i. e. if you are in Windows, to deploy the Azure Azure Application Insights in a new resourcegroup located in westus, go to `deploy\az` folder and type: | |||||
``` | |||||
create-resources.cmd applicationinsights\applicationinsights newResourceGroup -c westus | |||||
``` | |||||
## Setting Azure Application Insights InstrumentationKey in for projects | |||||
Cope from Azure portal InstrumentationKey and add it in containers configuration. | |||||
For Kubernates - it can be done in k8s\conf_cloud.yml file as a value for Instrumentation_Key key. | |||||
For local docker environment remove # from INSTRUMENTATION_KEY key in .env file. |