@@ -103,28 +103,20 @@ az monitor diagnostic-settings create --name "send-logs-and-metrics-to-log-analy
103103
104104Add Azure CLI extension for Application Insights:
105105``` bash
106- az extension add --name app-insights
107106az extension add --name application-insights
108107```
109108
110- Create Application Insights using Azure CLI:
109+ Create Application Insights using Azure CLI and retrieve the ` InstrumentationKey ` :
111110``` bash
112111az monitor app-insights component create --app ${APPLICATION_INSIGHTS} \
113112 --workspace ${LOG_ANALYTICS_RESOURCE_ID} \
114113 --location ${REGION} \
115114 --resource-group ${RESOURCE_GROUP}
116- ```
117115
118- > 🛑 - __ Manual Modification Required__ - looks like the ` application-insights ` Azure CLI extension
119- is missing in action. You have to create Application Insights using the Azure Portal and using the
120- same ` ${SUBSCRIPTION} ` , ` ${WEBAPP} ` as Application Insights Name, ` ${REGION} ` as Region,
121- Log Analytics Workspace ` ${LOG_ANALYTICS} ` in the same subscription, see:
122- ![ ] ( ./media/Create-Application-Insights.jpg )
123116
124- Go to the Azure Portal, locate the Application Insights that you just created, get it's
125- ` Instrumentation Key ` and set it to the environment:
126- ``` bash
127- export APPLICATIONINSIGHTS_CONNECTION_STRING=InstrumentationKey=your-application-insights-instrumentation-key
117+ export APPLICATIONINSIGHTS_CONNECTION_STRING=InstrumentationKey=$( az monitor \
118+ app-insights component show --app ${APPLICATION_INSIGHTS} \
119+ --resource-group ${RESOURCE_GROUP} | jq -r ' .instrumentationKey' )
128120```
129121
130122Download Application Insights Java in-process agent:
0 commit comments