Skip to content

Commit c66b26f

Browse files
authored
Merge pull request #255183 from AaronMaxwell/azure-web-apps-python
Python App Service auto-attach
2 parents 28f9979 + d87ef31 commit c66b26f

File tree

8 files changed

+234
-7
lines changed

8 files changed

+234
-7
lines changed

articles/azure-monitor/app/azure-web-apps-python.md

Lines changed: 218 additions & 0 deletions
Large diffs are not rendered by default.

articles/azure-monitor/app/azure-web-apps.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,11 @@ There are two ways to enable monitoring for applications hosted on App Service:
2828
- [.NET](./azure-web-apps-net.md)
2929
- [Java](./azure-web-apps-java.md)
3030
- [Node.js](./azure-web-apps-nodejs.md)
31+
- [Python](./azure-web-apps-python.md)
3132

3233
* **Manually instrumenting the application through code** by installing the Application Insights SDK.
3334

34-
This approach is much more customizable, but it requires the following approaches: SDK for [.NET Core](./asp-net-core.md), [.NET](./asp-net.md), [Node.js](./nodejs.md), [Python](/previous-versions/azure/azure-monitor/app/opencensus-python), and a standalone agent for [Java](./opentelemetry-enable.md?tabs=java). This method also means you must manage the updates to the latest version of the packages yourself.
35+
This approach is much more customizable, but it requires the following approaches: SDK for [.NET Core](./asp-net-core.md), [.NET](./asp-net.md), [Node.js](./nodejs.md), [Python](./opentelemetry-enable.md?tabs=python), and a standalone agent for [Java](./opentelemetry-enable.md?tabs=java). This method also means you must manage the updates to the latest version of the packages yourself.
3536

3637
If you need to make custom API calls to track events/dependencies not captured by default with autoinstrumentation monitoring, you need to use this method. To learn more, see [Application Insights API for custom events and metrics](./api-custom-events-metrics.md).
3738

@@ -165,4 +166,4 @@ The details depend on the type of project. For a web application:
165166

166167
## Next steps
167168

168-
Learn how to enable autoinstrumentation application monitoring for your [.NET Core](./azure-web-apps-net-core.md), [.NET](./azure-web-apps-net.md), [Java](./azure-web-apps-java.md), or [Nodejs](./azure-web-apps-nodejs.md) application running on App Service.
169+
Learn how to enable autoinstrumentation application monitoring for your [.NET Core](./azure-web-apps-net-core.md), [.NET](./azure-web-apps-net.md), [Java](./azure-web-apps-java.md), [Nodejs](./azure-web-apps-nodejs.md), or [Python](./azure-web-apps-python.md) application running on App Service.

articles/azure-monitor/app/codeless-overview.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Links are provided to more information for each supported scenario.
3434
|-------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------|
3535
|Azure App Service on Windows - Publish as Code | [ :white_check_mark: :link: ](azure-web-apps-net.md) ¹ | [ :white_check_mark: :link: ](azure-web-apps-net-core.md) ¹ | [ :white_check_mark: :link: ](azure-web-apps-java.md) ¹ | [ :white_check_mark: :link: ](azure-web-apps-nodejs.md) ¹ | :x: |
3636
|Azure App Service on Windows - Publish as Docker | [ :white_check_mark: :link: ](https://azure.github.io/AppService/2022/04/11/windows-containers-app-insights-preview.html) ² | [ :white_check_mark: :link: ](https://azure.github.io/AppService/2022/04/11/windows-containers-app-insights-preview.html) ² | [ :white_check_mark: :link: ](https://azure.github.io/AppService/2022/04/11/windows-containers-app-insights-preview.html) ² | [ :white_check_mark: :link: ](https://techcommunity.microsoft.com/t5/apps-on-azure-blog/public-preview-application-insights-auto-instrumentation-for/ba-p/3947971) ² | :x: |
37-
|Azure App Service on Linux - Publish as Code | :x: | [ :white_check_mark: :link: ](azure-web-apps-net-core.md?tabs=linux) ¹ | [ :white_check_mark: :link: ](azure-web-apps-java.md) ¹ | [ :white_check_mark: :link: ](azure-web-apps-nodejs.md?tabs=linux) | :x: |
37+
|Azure App Service on Linux - Publish as Code | :x: | [ :white_check_mark: :link: ](azure-web-apps-net-core.md?tabs=linux) ¹ | [ :white_check_mark: :link: ](azure-web-apps-java.md) ¹ | [ :white_check_mark: :link: ](azure-web-apps-nodejs.md?tabs=linux) | [ :white_check_mark: :link: ](azure-web-apps-python.md?tabs=linux) ² |
3838
|Azure App Service on Linux - Publish as Docker | :x: | [ :white_check_mark: :link: ](azure-web-apps-net-core.md?tabs=linux) | [ :white_check_mark: :link: ](azure-web-apps-java.md) | [ :white_check_mark: :link: ](azure-web-apps-nodejs.md?tabs=linux) | :x: |
3939
|Azure Functions - basic | [ :white_check_mark: :link: ](monitor-functions.md) ¹ | [ :white_check_mark: :link: ](monitor-functions.md) ¹ | [ :white_check_mark: :link: ](monitor-functions.md) ¹ | [ :white_check_mark: :link: ](monitor-functions.md) ¹ | [ :white_check_mark: :link: ](monitor-functions.md) ¹ |
4040
|Azure Functions - dependencies | :x: | :x: | [ :white_check_mark: :link: ](monitor-functions.md) | :x: | [ :white_check_mark: :link: ](monitor-functions.md#distributed-tracing-for-python-function-apps) |
@@ -54,7 +54,7 @@ Links are provided to more information for each supported scenario.
5454
5555
## JavaScript (Web) SDK Loader Script injection by configuration
5656

57-
When using supported SDKs, you can enable SDK injection in configuration to automatically inject JavaScript (Web) SDK Loader Script onto each page.
57+
When using supported Software Development Kits (SDKs), you can enable SDK injection in configuration to automatically inject JavaScript (Web) SDK Loader Script onto each page.
5858

5959

6060
| Language
10.2 KB
Loading
42.7 KB
Loading
-22.4 KB
Loading

articles/azure-monitor/toc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@ items:
6767
href: app/azure-web-apps-java.md
6868
- name: Node.js
6969
href: app/azure-web-apps-nodejs.md
70+
- name: Python
71+
href: app/azure-web-apps-python.md
7072
- name: Azure Functions
7173
displayName: functions, monitor functions, automation
7274
href: app/monitor-functions.md

includes/azure-monitor-app-insights-azure-web-apps-arm-automation.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,20 +37,23 @@ For an example of a Resource Manager template with application settings configur
3737

3838
### Automate the creation of an Application Insights resource and link to your newly created App Service resource
3939

40-
To create a Resource Manager template with all the default Application Insights settings configured, begin the process as if you were going to create a new web app with Application Insights enabled.
40+
To create a Resource Manager template with the default Application Insights settings, begin the process as if you were going to create a new web app with Application Insights enabled.
4141

4242
1. Create a new App Service resource with your desired web app information. Enable Application Insights on the **Monitoring** tab.
4343

4444
1. Select **Review + create**. Then select **Download a template for automation**.
4545

46-
:::image type="content" source="../articles/azure-monitor/app/media/azure-web-apps/create-web-app.png" alt-text="Screenshot that shows the App Service web app creation menu." :::
46+
:::image type="content" source="../articles/azure-monitor/app/media/azure-web-apps/create-web-app.png" alt-text="Screenshot that shows the App Service web app creation menu." lightbox="../articles/azure-monitor/app/media/azure-web-apps/create-web-app.png":::
4747

4848
This option generates the latest Resource Manager template with all required settings configured.
4949

50-
:::image type="content" source="../articles/azure-monitor/app/media/azure-web-apps/arm-template.png" alt-text="Screenshot that shows an App Service web app template." border="false":::
50+
:::image type="content" source="../articles/azure-monitor/app/media/azure-web-apps/arm-template.png" alt-text="Screenshot that shows an App Service web app template." border="false" lightbox="../articles/azure-monitor/app/media/azure-web-apps/arm-template.png":::
5151

5252
In the following sample, replace all instances of `AppMonitoredSite` with your site name:
5353

54+
> [!NOTE]
55+
> If using Windows, set `ApplicationInsightsAgent_EXTENSION_VERSION` to `~2`. If using Linux, set `ApplicationInsightsAgent_EXTENSION_VERSION` to `~3`.
56+
5457
```json
5558
{
5659
"resources": [
@@ -152,6 +155,9 @@ To enable the application monitoring through PowerShell, only the underlying app
152155

153156
[!INCLUDE [updated-for-az](updated-for-az.md)]
154157

158+
> [!NOTE]
159+
> If using Windows, set ApplicationInsightsAgent_EXTENSION_VERSION to `~2`. If using Linux, set ApplicationInsightsAgent_EXTENSION_VERSION to `~3`.
160+
155161
```powershell
156162
$app = Get-AzWebApp -ResourceGroupName "AppMonitoredRG" -Name "AppMonitoredSite" -ErrorAction Stop
157163
$newAppSettings = @{} # case-insensitive hash map

0 commit comments

Comments
 (0)