You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -181,7 +181,7 @@ To create a Container Apps environment and a container app as the target Java ap
181
181
182
182
1. Create a Container Apps environment by using the following command:
183
183
184
-
# [Bash](#tab/bash)
184
+
# [Azure CLI](#tab/azurecli)
185
185
186
186
```azurecli
187
187
az containerapp env create \
@@ -191,7 +191,7 @@ To create a Container Apps environment and a container app as the target Java ap
191
191
--query "properties.provisioningState"
192
192
```
193
193
194
-
# [PowerShell](#tab/powershell)
194
+
# [Azure PowerShell](#tab/azurepowershell)
195
195
196
196
```azurepowershell
197
197
az containerapp env create `
@@ -203,11 +203,11 @@ To create a Container Apps environment and a container app as the target Java ap
203
203
204
204
---
205
205
206
-
After successfully creating the Container Apps environment, the command line returns a `Succeeded` message.
206
+
After you successfully create the Container Apps environment, the command line returns a `Succeeded` message.
207
207
208
-
1. Create a container app for further configurations by using the following command:
208
+
1. Create a container app for further configuration by using the following command:
209
209
210
-
# [Bash](#tab/bash)
210
+
# [Azure CLI](#tab/azurecli)
211
211
212
212
```bash
213
213
az containerapp create \
@@ -217,7 +217,7 @@ To create a Container Apps environment and a container app as the target Java ap
217
217
--query "properties.provisioningState"
218
218
```
219
219
220
-
# [PowerShell](#tab/powershell)
220
+
# [Azure PowerShell](#tab/azurepowershell)
221
221
222
222
```powershell
223
223
az containerapp create `
@@ -227,15 +227,17 @@ To create a Container Apps environment and a container app as the target Java ap
227
227
--query "properties.provisioningState"
228
228
```
229
229
230
-
After successfully creating the Container App, the command line returns a `Succeeded` message.
230
+
---
231
+
232
+
After you create the container app, the command line returns a `Succeeded` message.
231
233
232
234
## Configure init container, secrets, environment variables, and volumes to set up Application Insights integration
233
235
234
-
Use the following steps to configure your init container with secrets, environment variables, and volumes so you can use them with Application Insights:
236
+
Use the following steps to configure your init container with secrets, environment variables, and volumes. This configuration allows you to use the stored information with your Application Insights instance.
235
237
236
-
1. Write the current configurations of the running Container App to **app.yaml**in the current directory, by using the following command:
238
+
1. Write the current configuration of the running Container App to an **app.yaml** filein the current directory, by using the following command:
237
239
238
-
# [Bash](#tab/bash)
240
+
# [Azure CLI](#tab/azurecli)
239
241
240
242
```bash
241
243
az containerapp show \
@@ -245,7 +247,7 @@ Use the following steps to configure your init container with secrets, environme
245
247
> app.yaml
246
248
```
247
249
248
-
# [PowerShell](#tab/powershell)
250
+
# [Azure PowerShell](#tab/azurepowershell)
249
251
250
252
```powershell
251
253
az containerapp show `
@@ -255,9 +257,9 @@ Use the following steps to configure your init container with secrets, environme
255
257
> app.yaml
256
258
```
257
259
258
-
1. Edit **app.yaml**by using the following steps:
260
+
1. Use the following steps to edit your **app.yaml**file. The edits add secrets, ephemeral storage, and an init container to the file, and update the app container.
259
261
260
-
1. Add a secret for the Application Insights connection string using the following example. Be sure to replace`$CONNECTION_STRING` with your Application Insights connection string.
262
+
1. Add a secret for the Application Insights connection string by using the following example. Replace`$CONNECTION_STRING` with your Application Insights connection string.
261
263
262
264
```yaml
263
265
properties:
@@ -267,10 +269,8 @@ Use the following steps to configure your init container with secrets, environme
267
269
value: $CONNECTION_STRING
268
270
```
269
271
270
-
Replace $CONNECTION_STRING with your Azure Application Insights connection string.
272
+
1. Add an ephemeral storage volume for Java agent files by using the following example:
271
273
272
-
1. Add an ephemeral storage volume for Java agent files by using the following code example:
273
-
274
274
```yaml
275
275
properties:
276
276
template:
@@ -279,8 +279,8 @@ Use the following steps to configure your init container with secrets, environme
279
279
storageType: EmptyDir
280
280
```
281
281
282
-
1. Add an init container with volume mounts and environment variables by using the following example. Be sure to replace`<CONTAINER_REGISTRY_NAME>` with your Azure Container Registry name.
283
-
282
+
1. Add an init container with volume mounts and environment variables by using the following example. Replace`<CONTAINER_REGISTRY_NAME>` with your Azure Container Registry name.
283
+
284
284
```yaml
285
285
properties:
286
286
template:
@@ -317,47 +317,49 @@ Use the following steps to configure your init container with secrets, environme
317
317
volumeName: java-agent-volume
318
318
```
319
319
320
-
1. Update the container app with the modified YAML file by using the following command:
321
-
322
-
# [Bash](#tab/bash)
323
-
324
-
```bash
325
-
az containerapp update \
326
-
--name $CONTAINER_APP_NAME \
327
-
--resource-group $RESOURCE_GROUP\
328
-
--yaml app.yaml \
329
-
--query "properties.provisioningState"
330
-
```
331
-
332
-
# [PowerShell](#tab/powershell)
333
-
334
-
```powershell
335
-
az containerapp update `
336
-
--name $CONTAINER_APP_NAME`
337
-
--resource-group $RESOURCE_GROUP`
338
-
--yaml app.yaml `
339
-
--query "properties.provisioningState"
340
-
```
341
-
342
-
---
320
+
1. Update the container app with the modified **app.yaml** file by using the following command:
321
+
322
+
# [Azure CLI](#tab/azurecli)
323
+
324
+
```azurecli
325
+
az containerapp update \
326
+
--resource-group $RESOURCE_GROUP\
327
+
--name $CONTAINER_APP_NAME \
328
+
--yaml app.yaml \
329
+
--query "properties.provisioningState"
330
+
```
331
+
332
+
# [Azure PowerShell](#tab/azurepowershell)
333
+
334
+
```azurepowershell
335
+
az containerapp update `
336
+
--resource-group $RESOURCE_GROUP`
337
+
--name $CONTAINER_APP_NAME`
338
+
--yaml app.yaml `
339
+
--query "properties.provisioningState"
340
+
```
341
+
342
+
---
343
+
344
+
After you update the container app, the command returns a `Succeeded` message. Now you can verify that your container app is connected, by viewing your Application Insights instance in the Azure portal.
343
345
344
-
After updating the container app, the command returns a `Succeeded` message. Then, you can verify that your container app is connected by viewing your Application Insights instance in the Azure portal.
345
-
346
346
## Clean up resources
347
347
348
-
The resources you created in this tutorial contribute to your Azure bill. If you aren't going to need them in the long term, use the following command to remove the resource group, which also removes all the resources it contains:
348
+
The resources you created in this tutorial contribute to your Azure bill. If you won't need them long term, use the following command to remove the resource group and its resources:
349
349
350
-
# [Bash](#tab/bash)
350
+
# [Azure CLI](#tab/azurecli)
351
351
352
352
```bash
353
353
az group delete --resource-group $RESOURCE_GROUP
354
354
```
355
355
356
-
# [PowerShell](#tab/powershell)
356
+
# [Azure PowerShell](#tab/azurepowershell)
357
357
```powershell
358
358
az group delete --resource-group $RESOURCE_GROUP
359
359
```
360
360
361
+
---
362
+
361
363
## Other APM solutions
362
364
363
365
Other than [Azure Application Insights](/azure/azure-monitor/app/java-standalone-config), there are other popular APM solutions in the community. If you want to integrate your Azure Container App with other APM providers, just replace the Java agent JAR and related config files.
0 commit comments