This page contains Windows bias

About This Page

This page is part of the Azure documentation. It contains code examples and configuration instructions for working with Azure services.

Bias Analysis

Bias Types:
⚠️ windows_first
⚠️ missing_linux_example
Summary:
The documentation demonstrates a Windows bias by specifying 'Windows' as the operating system in the App Service creation step and not mentioning Linux as an alternative. There are no examples or instructions for deploying or configuring the app on Linux App Service plans, nor are there any Linux-specific notes or parity checks. All runtime and deployment steps assume a Windows environment, and no Linux shell or configuration examples are provided.
Recommendations:
  • Explicitly mention that both Windows and Linux App Service plans are supported, if applicable.
  • Provide parallel instructions for creating the App Service on Linux, including screenshots and configuration differences.
  • Include Linux-specific notes for environment variables, deployment, and troubleshooting if there are any differences.
  • When listing the 'Runtime stack' and 'Operating System' options, show both Windows and Linux choices, and clarify any limitations.
  • If certain features are Windows-only, clearly state this early in the documentation and provide workarounds or alternatives for Linux users.
GitHub Create pull request

Scan History

Date Scan ID Status Bias Status
2025-08-29 00:01 #95 completed ✅ Clean
2025-08-11 00:00 #77 completed ✅ Clean
2025-08-10 00:00 #76 completed ✅ Clean
2025-08-09 00:00 #75 completed ✅ Clean
2025-08-08 00:00 #74 completed ✅ Clean
2025-08-07 00:00 #73 completed ✅ Clean
2025-08-06 00:00 #72 completed ✅ Clean
2025-08-05 00:00 #71 completed ✅ Clean
2025-08-03 00:00 #69 completed ✅ Clean
2025-08-01 00:00 #67 completed ✅ Clean
2025-07-31 00:00 #66 completed ✅ Clean
2025-07-30 00:00 #65 completed ✅ Clean
2025-07-29 00:01 #64 completed ✅ Clean
2025-07-28 00:00 #63 completed ✅ Clean
2025-07-27 00:00 #62 completed ✅ Clean
2025-07-26 00:01 #61 completed ✅ Clean
2025-07-25 00:00 #60 completed ✅ Clean
2025-07-24 00:00 #59 completed ✅ Clean
2025-07-23 00:00 #58 completed ✅ Clean
2025-07-22 00:01 #57 completed ✅ Clean
2025-07-21 00:00 #56 completed ✅ Clean
2025-07-19 13:51 #54 completed ❌ Biased
2025-07-16 00:00 #52 completed ❌ Biased
2025-07-13 21:37 #48 completed ✅ Clean
2025-07-12 23:44 #41 in_progress ❌ Biased

Flagged Code Snippets

* **Access to Sweden Central region**: During preview, the only allowed region for SRE Agent is Sweden Central. Make sure your user account has *owner* or *admin* permissions and permissions to create resources in the Sweden Central region. ## 1. Create an App Service app Start by creating a web app that the SRE Agent can monitor. 1. Sign in to the https://portal.azure.com. 1. In the top search bar, search for **App Services**, then select it from the results. 1. Select **+ Create** and choose **Web App**. ### Configure the Basics tab In the *Basics* tab, provide the following details: **Project details** | Setting | Value | |-----------------|--------------------------------| | Subscription | Your Azure subscription | | Resource group | **Create new** → `my-app-service-group` | **Instance details** | Setting | Value | |-----------------|--------------------------------| | Name | `my-sre-app` | | Publish | **Code** | | Runtime stack | **.NET 9 (STS)** | | Operating System| **Windows** | | Region | A region near you | 1. Select the **Deployment** tab. 1. Under *Authentication settings*, enable **Basic authentication**. > [!NOTE] > Basic authentication is used later for a one-time deployment from GitHub. [Disable basic auth](/azure/app-service/configure-basic-auth-disable?tabs=portal) in production. > 1. Select **Review and create**, then **Create** when validation passes. 1. Once deployment completes, you see *Your deployment is complete*. ## 2. Deploy the sample app Now that your App Service app is created, deploy the sample application from GitHub. 1. In the Azure portal, navigate to your newly created App Service by selecting **Go to resource**. 1. In the left-hand menu, under the *Deployment* section, select **Deployment Center**. 1. In the *Settings* tab, configure: | Property | Value | |------------|--------------------------------------------------------------| | Source | **External Git** | | Repository | `https://github.com/Azure-Samples/app-service-dotnet-agent-tutorial`| | Branch | `main` | 1. Select **Save** to apply the deployment settings. ## 3. Verify the sample app After deployment, confirm that the sample app is running as expected. 1. In the left menu of your App Service, select **Overview**. 1. Select **Browse** to open the app in a new browser tab. (It might take a minute to load.) 1. The app displays a large counter and two buttons: :::image type="content" source="media/troubleshoot-azure-app-service/verify-sample-primary-slot.png" alt-text="Screenshot of the .NET sample in the primary slot."::: 1. Select the *Increment* button several times to observe the counter increase. ## 4. Set up a deployment slot for failure simulation To simulate an app failure scenario, add a secondary deployment slot. 1. In the left menu of your App Service, under the *Deployment* section, select **Deployment slots**. 1. Select **Add slot**. 1. Enter the following values: | Property | Value | Remarks | |---------------------|--------------|------------------------------------------------------------------------------------------| | Name | `broken` | The error scenario is triggered in this slot. | | Clone settings from | `my-sre-app` | Copies configuration from the main app. | 1. Scroll to the bottom of the dialog window and select **Add**. Slot creation might take a minute to complete. ### Deploy the sample app to the slot 1. Once the slot is created, select the **broken** slot from the list. 1. In the left menu, under the *Deployment* section, select **Deployment Center**. 1. In the *Settings* tab, configure: | Property | Value | |------------|---------------------------------------------------------------| | Source | **External Git** | | Repository | `https://github.com/Azure-Samples/app-service-dotnet-agent-tutorial` | | Branch | `main` | 1. Select **Save** to apply the deployment settings. ### Add an app setting to enable error simulation To control error simulation, configure an app setting your app checks at runtime. 1. In the left menu of your App Service, select **Environment variables** under the *Settings* section. 1. At the top, make sure you have the correct slot selected (for example, **broken**). 1. Under the **App settings** tab, select **+ Add**. 1. Enter the following values: | Property | Value | Remarks | |------------|---------------|--------------------------------------------------------------| | Name | `INJECT_ERROR`| Must be exactly `INJECT_ERROR` (all caps, no spaces). | | Value | `1` | Enables error simulation in the app. | 1. Make sure the **Deployment slot setting** box is **not** checked. 1. Select **Apply** to add the setting. 1. At the bottom of the *Environment variables* page, select **Apply** to apply the changes. 1. When prompted, select **Confirm** to confirm and restart the app in the selected slot. ## 5. Create an Azure SRE Agent Now, create an Azure SRE Agent to monitor your App Service app. 1. In the Azure portal, search for and select **Azure SRE Agent**. 1. Select **+ Create**. 1. In the *Create agent* window, enter the following values: | Property | Value | Remarks | |------------------|---------------------------|-------------------------------------------------------------------------| | Subscription | Your Azure subscription | | | Resource group | `my-sre-agent-group` | New group for the Azure SRE Agent | | Name | `my-sre-agent`| | | Region | **Sweden Central** | Required during preview; can monitor resources in any Azure region | | Choose role | **Contributor** | Grants the agent permission to take action on your behalf | 1. Select **Select resource groups**. 1. In the *Selected resource groups to monitor* window, search for and select `my-app-service-group`. 1. Select **Save**. 1. Back in the *Create agent* window, select **Create**. The agent creation process takes a few minutes to complete. ## 6. Chat with your agent Once your SRE Agent is deployed and connected to your resource group, you can interact with it using natural language to monitor and troubleshoot your app. 1. In the Azure portal, search for and select **Azure SRE Agent**. 1. From the list of agents, select **my-app-service-sre-agent**. 1. Select **Chat with agent**. 1. In the chat box, enter the following command: