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 creation step and omitting any mention of Linux or cross-platform alternatives. There are no examples or instructions for deploying or configuring the app on Linux-based App Service plans, and no Linux-specific guidance is provided for runtime stack, startup commands, or environment variable management.
Recommendations:
  • Provide parallel instructions for creating the App Service app on Linux, including selecting 'Linux' as the operating system and specifying supported runtime stacks.
  • Include Linux-specific notes for configuring environment variables and startup commands, as the UI and options can differ from Windows.
  • Add a table or section comparing Windows and Linux App Service plans, highlighting any differences relevant to SRE Agent usage.
  • Ensure that all steps (deployment, slot management, environment variable configuration) are described for both Windows and Linux App Service environments.
  • If certain features are Windows-only, explicitly state this 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. Before you proceed, make sure to account for the [mandatory prerequisites](#prerequisites) so you can create an SRE Agent instance. 1. Follow the link provided in your onboarding email to access the Azure SRE Agent in the Azure portal. 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** | During preview, Azure SRE Agent is only available in the *Sweden Central* region, but the agent can monitor resources in any Azure region.<br><br>If you don't see any options in the dropdown, then you may not have permissions to access to the Sweden Central region. | 1. Select **Select resource groups**. 1. In the *Selected resource groups to monitor* window, search for and check the checkbox next to `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: