Skip to content

Commit aaa7708

Browse files
committed
fix acro
1 parent aa9f17d commit aaa7708

File tree

1 file changed

+28
-31
lines changed

1 file changed

+28
-31
lines changed

articles/app-service/tutorial-sre-agent.md

Lines changed: 28 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: 'Tutorial: Troubleshoot an app using Azure SRE Agent (preview) in Azure App Service'
2+
title: 'Tutorial: Troubleshoot an App using Azure SRE Agent (preview) in Azure App Service'
33
description: Learn how to use SRE Agent and Azure App Service to identify and fix app issues with AI-assisted troubleshooting.
44
author: msangapu-msft
55
ms.author: msangapu
@@ -9,11 +9,10 @@ ms.date: 05/15/2025
99

1010
# Troubleshoot an App Service app using SRE Agent (preview)
1111

12-
> ![NOTE]
12+
> [!NOTE]
1313
> Site Reliability Engineering (SRE) Agent is in preview.
14-
>
1514
16-
The Azure SRE (Site Reliability Engineering) Agent helps you manage and monitor Azure resources by using AI-enabled capabilities. Agents guide you in solving problems and aids in build resilient, self-healing systems on your behalf. The sample app includes code meant to exhaust memory and cause HTTP 500 errors, so you can diagnose and fix the problem using SRE Agent.
15+
The Azure SRE (Site Reliability Engineering) Agent helps you manage and monitor Azure resources by using AI-enabled capabilities. Agents guide you in solving problems and aid in building resilient, self-healing systems on your behalf. The sample app includes code meant to exhaust memory and cause HTTP 500 errors, so you can diagnose and fix the problem using SRE Agent.
1716

1817
In this tutorial, you:
1918

@@ -22,7 +21,7 @@ In this tutorial, you:
2221
> * Deploy a sample App Service app using the Azure portal
2322
> * Enable App Service logs
2423
> * Create an Azure SRE Agent (preview) to monitor the app
25-
> * Cause the app to produce a HTTP 500 error
24+
> * Trigger an HTTP 500 error in the app
2625
> * Use AI-driven prompts to troubleshoot and fix errors
2726
2827
[!INCLUDE [quickstarts-free-trial-note](~/reusable-content/ce-skilling/azure/includes/quickstarts-free-trial-note.md)]
@@ -31,7 +30,7 @@ In this tutorial, you:
3130

3231
To complete this tutorial, you need an [Azure subscription](https://azure.microsoft.com/free/).
3332

34-
## 1. Create an App Service app
33+
## Create an App Service app
3534

3635
Begin by creating an app for your agent to monitor.
3736

@@ -56,18 +55,18 @@ In the *Basics* tab, do the following actions.
5655

5756
| Setting | Action |
5857
|---|---|
59-
| Name app name | Enter **my-sre-app**. |
60-
| Publish | Select **Code**. |
61-
| Runtime stack| Select **PHP 8.4**. |
58+
| Name app name | Enter **my-sre-app**. |
59+
| Publish | Select **Code**. |
60+
| Runtime stack | Select **PHP 8.4**. |
6261
| Region | Select a region near you. |
6362

6463
1. Select the **Deployment** tab.
6564

6665
1. Enable **Basic authentication** in the *Authentication settings* section. This is used later for a one-time deployment from GitHub. In production, [disable Basic Auth](configure-basic-auth-disable.md?tabs=portal) and use secure deployment methods like GitHub Actions or Azure DevOps.
6766

68-
1. Select **Review and create** at the bottom of the page.
67+
1. Select **Review and create** at the bottom of the page.
6968

70-
If no errors are found, the *Create* button is enabled.
69+
If no errors are found, the *Create* button is enabled.
7170

7271
If there are errors, any tab containing errors is marked with a red dot. Navigate to the appropriate tab. Fields containing an error are highlighted in red. Once all errors are fixed, select **Review and create** again.
7372

@@ -85,13 +84,13 @@ In the *Basics* tab, do the following actions.
8584

8685
| Property | Value | Remarks |
8786
|---|---|---|
88-
| Source | Select **External Git**. | |
89-
| Repository | Enter **https://github.com/Azure-Samples/App-Service-Agent-Tutorial**. | |
90-
| Branch | Select **working**. | |
87+
| Source | Select **External Git**. | |
88+
| Repository | Enter **https://github.com/Azure-Samples/App-Service-Agent-Tutorial**. | |
89+
| Branch | Select **working**. | |
9190

9291
1. Select **Save**.
9392

94-
## 2. Configure the app
93+
## Configure the app
9594

9695
These steps configure the sample app with a *Startup command* and enable App Service logs.
9796

@@ -124,7 +123,7 @@ This step configures application logs required by the SRE Agent to diagnose and
124123

125124
1. Select **Save**.
126125

127-
## 3. Verify the sample app
126+
## Verify the sample app
128127

129128
1. Select **Overview** in the left menu.
130129

@@ -138,7 +137,7 @@ This step configures application logs required by the SRE Agent to diagnose and
138137
139138
![Select the first two images](./media/tutorial-azure-monitor/sample-monitor-app-convert-two-images.png)
140139
141-
## 4. Create a deployment slot
140+
## Create a deployment slot
142141
143142
1. In the left menu, find the *Deployment* section and select **Deployment slots**.
144143
@@ -169,7 +168,7 @@ This step configures application logs required by the SRE Agent to diagnose and
169168
170169
1. Select **Save**.
171170
172-
## 5. Create an SRE agent
171+
## Create an SRE agent
173172
174173
Next, create an agent to monitor the *my-aca-app-group* resource group.
175174
@@ -197,7 +196,7 @@ Next, create an agent to monitor the *my-aca-app-group* resource group.
197196
198197
1. Select **Create**.
199198
200-
## 6. Chat with your agent
199+
## Chat with your agent
201200
202201
Your agent has access to any resource inside the resource groups associated with the agent. Use the chat feature to help you inquire about and resolve issues related to your resources.
203202
@@ -217,7 +216,7 @@ Your agent has access to any resource inside the resource groups associated with
217216
218217
Now that you have an agent that sees your App Service app, you can create an opportunity for the agent to make a fix on your behalf.
219218
220-
## 7. Break the app
219+
## Break the app
221220
222221
1. In your App Service app page, find **Deployment* section in the left menu and select **Deployment slots**.
223222
@@ -244,7 +243,7 @@ Now that you have an agent that sees your App Service app, you can create an opp
244243
245244
1. Repeat the convert step several more times to log more HTTP 500s.
246245
247-
## 7. Fix the app
246+
## Fix the app
248247
249248
1. Go to the Azure portal, search for and select **Azure SRE Agent**.
250249
@@ -262,33 +261,31 @@ Now that you have an agent that sees your App Service app, you can create an opp
262261
263262
While every chat session is different, you should see a response that resembles the following response.
264263
265-
>I will now perform mitigation for my-sre-app by swapping the slots back to recover the application to a healthy state. Please note that swapping slots back may not always immediately restore health. I will keep you updated on the progress.
266-
>
264+
> I will now perform mitigation for my-sre-app by swapping the slots back to recover the application to a healthy state. Please note that swapping slots back may not always immediately restore health. I will keep you updated on the progress.
267265
268266
Given that enough time has passed for the SRE Agent to detect the errors, it will prompt you with the following message:
269267
270-
>Performing Slot Swap rollback to Restore Application Avaialibilty for my-sre-app
271-
>[Approve] [Deny]
272-
268+
> Performing Slot Swap rollback to Restore Application Availability for my-sre-app
269+
> [Approve] [Deny]
273270
274271
1. Select the **Approve** button to rollback the swap.
275272
276-
As your agent processes this command. After the swap, the agent's response will include with something that resembles the following message:
273+
As your agent processes this command. After the swap, the agent's response will include something that resembles the following message:
277274
278275
> The slot swap for my-sre-app has been completed successfully <timestamp>. The production slot has been restored. I will now continue with post-mitigation steps:
279-
>>I will ask you for the correct GitHub repo URL to raise an issue for the swap-related downtime.
280-
>>I will monitor the app and provide an availability update in 5 minutes.
276+
>> I will ask you for the correct GitHub repo URL to raise an issue for the swap-related downtime.
277+
>> I will monitor the app and provide an availability update in 5 minutes.
281278
> Please provide the GitHub repository URL where you want the issue to be raised.
282279
283-
## 8. Verify the fix
280+
## Verify the fix
284281
285282
1. To verify your App Service app is working properly, open the app's URL in a browser.
286283
287284
1. To convert images, click `Tools` and select `Convert to PNG`.
288285
289286
![Click `Tools` and select `Convert to PNG`](./media/tutorial-azure-monitor/sample-monitor-app-tools-menu.png)
290287
291-
1. Select the first 5 images and click `convert`. Converting images should not longer produce the HTTP 500 errors.
288+
1. Select the first 5 images and click `convert`. Converting images should no longer produce HTTP 500 errors.
292289
293290
![Select the first five images](./media/tutorial-azure-monitor/sample-monitor-app-working.png)
294291

0 commit comments

Comments
 (0)