Skip to content

Commit f49c1ec

Browse files
Edits to the top half of the article.
1 parent 7c751be commit f49c1ec

File tree

1 file changed

+27
-26
lines changed

1 file changed

+27
-26
lines changed

articles/container-apps/java-application-performance-management-config.md

Lines changed: 27 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -8,42 +8,43 @@ ms.custom: devx-track-azurecli
88
ms.topic: tutorial
99
ms.date: 11/4/2024
1010
ms.author: kuzhong
11+
author: karler
1112
---
1213

1314
# Tutorial: Configure Application Performance Management (APM) Java agent with init-container in Azure Container Apps
1415

15-
Apply Java agent and init containers in Azure Container Apps to inject Application Performance Management (APM) solutions without modifying your app image. While you can package the APM plugin in the same image or Dockerfile with your app, it binds the management efforts together, like release and Common Vulnerabilities and Exposures (CVE) mitigation.
16+
Apply Java agent and init containers in Azure Container Apps to inject Application Performance Management (APM) solutions without modifying your app image. While you can package the APM plugin in the same image or Dockerfile with your app, this binds together management efforts like release and Common Vulnerabilities and Exposures (CVE) mitigation.
1617

1718
In this tutorial, you learn how to:
1819

1920
> [!div class="checklist"]
20-
> * Prepare an image to set up Java agent and push to Azure Container Registry
21-
> * Create a Container Apps environment and a container app as the target Java app
22-
> * Configure init containers and volume mounts to set up Application Insights integration
21+
> * Prepare an image to set up Java agent and push to Azure Container Registry.
22+
> * Create a Container Apps environment and a container app as the target Java app.
23+
> * Configure init containers and volume mounts to set up Application Insights integration.
2324
2425
## Prerequisites
2526

26-
- Have an instance of [Application Insights](/azure/azure-monitor/app/app-insights-overview)
27-
- Have an instance of Azure Container Registry or other container image registries
28-
- Install [Docker](https://www.docker.com/) to build image
29-
- Install the latest version of the [Azure CLI](/cli/azure/install-azure-cli)
27+
- An instance of [Application Insights](/azure/azure-monitor/app/app-insights-overview).
28+
- An instance of Azure Container Registry or another container image registry.
29+
- [Docker](https://www.docker.com/), to build an image.
30+
- The latest version of the [Azure CLI](/cli/azure/install-azure-cli).
3031

3132
## Set up the environment
3233

33-
The following commands help you define variables and ensure your Container Apps extension is up to date.
34+
The following steps define environment variables and ensure your Container Apps extension is up to date:
3435

35-
1. Set up environment variables used in following commands.
36+
1. To define environment variables, use the following commands:
3637

3738
# [Bash](#tab/bash)
3839

3940
```bash
40-
SUBSCRIPTION_ID="<SUBSCRIPTION_ID>" # Replace with your own Azure subscription ID
41-
APP_INSIGHTS_RESOURCE_ID="/subscriptions/$SUBSCRIPTION_ID/resourceGroups/my-resource-group/providers/microsoft.insights/components/my-app-insights"
42-
CONTAINER_REGISTRY_NAME="myacr"
43-
RESOURCE_GROUP="my-resource-group"
44-
ENVIRONMENT_NAME="my-environment"
45-
CONTAINER_APP_NAME="my-container-app"
46-
LOCATION="eastus"
41+
export SUBSCRIPTION_ID="<SUBSCRIPTION_ID>" # Replace with your own Azure subscription ID
42+
export APP_INSIGHTS_RESOURCE_ID="/subscriptions/$SUBSCRIPTION_ID/resourceGroups/my-resource-group/providers/microsoft.insights/components/my-app-insights"
43+
export CONTAINER_REGISTRY_NAME="myacr"
44+
export RESOURCE_GROUP="my-resource-group"
45+
export ENVIRONMENT_NAME="my-environment"
46+
export CONTAINER_APP_NAME="my-container-app"
47+
export LOCATION="eastus"
4748
```
4849

4950
# [PowerShell](#tab/powershell)
@@ -58,7 +59,7 @@ The following commands help you define variables and ensure your Container Apps
5859
$LOCATION="eastus"
5960
```
6061

61-
1. Sign in to the Azure CLI.
62+
1. To sign in to Azure CLI, use the following commands:
6263

6364
# [Bash](#tab/bash)
6465

@@ -74,7 +75,7 @@ The following commands help you define variables and ensure your Container Apps
7475
az account set --subscription $SUBSCRIPTION_ID
7576
```
7677

77-
1. Ensure you have the latest version of Azure CLI extensions for Container Apps and Application Insights.
78+
1. To ensure you have the latest version of Azure CLI extensions for Container Apps and Application Insights, use the following commands:
7879

7980
# [Bash](#tab/bash)
8081

@@ -90,7 +91,7 @@ The following commands help you define variables and ensure your Container Apps
9091
az extension add -n application-insights --upgrade
9192
```
9293

93-
1. Retrieve the connection string of Application Insights.
94+
1. To retrieve the connection string of Application Insights, use the following commands:
9495

9596
# [Bash](#tab/bash)
9697

@@ -110,9 +111,9 @@ The following commands help you define variables and ensure your Container Apps
110111

111112
## Prepare the container image
112113

113-
1. Build setup image for Application Insights Java agent.
114+
To build a setup image for Application Insights Java agent, perform these following steps in the same directory:
114115

115-
Save the Dockerfile along with the setup script, and run `docker build` in the same directory.
116+
1. Save the following Dockerfile:
116117

117118
```Dockerfile
118119
FROM mcr.microsoft.com/cbl-mariner/base/core:2.0
@@ -128,7 +129,7 @@ The following commands help you define variables and ensure your Container Apps
128129
ENTRYPOINT ["/bin/sh", "setup.sh"]
129130
```
130131

131-
---
132+
1. Save the following setup script:
132133

133134
```setup.sh
134135
#!/bin/sh
@@ -142,7 +143,7 @@ The following commands help you define variables and ensure your Container Apps
142143
fi
143144
```
144145

145-
---
146+
1. Run the following command to create the image:
146147

147148
# [Bash](#tab/bash)
148149

@@ -156,7 +157,7 @@ The following commands help you define variables and ensure your Container Apps
156157
docker build . -t "$CONTAINER_REGISTRY_NAME.azurecr.io/samples/java-agent-setup:1.0.0"
157158
```
158159

159-
1. Push the image to Azure Container Registry or other container image registries.
160+
1. Push the image to Azure Container Registry or another container image registry by using the following command:
160161

161162
# [Bash](#tab/bash)
162163

@@ -173,7 +174,7 @@ The following commands help you define variables and ensure your Container Apps
173174
```
174175

175176
> [!TIP]
176-
> You can find related code in this step from [Azure-Samples/azure-container-apps-java-samples](https://github.com/Azure-Samples/azure-container-apps-java-samples).
177+
> You can find code relevant to this step in the [Azure Contaier Apps Java Samples](https://github.com/Azure-Samples/azure-container-apps-java-samples) GitHub repo.
177178

178179
## Create a Container Apps environment and a Container App as the target Java app
179180

0 commit comments

Comments
 (0)