From 45428ee4cdb8f4e3838f92d4299443c39afba78d Mon Sep 17 00:00:00 2001 From: Leighton Chen Date: Tue, 15 Jul 2025 15:16:20 -0800 Subject: [PATCH 1/3] Update Python opentelemetry how-to --- articles/azure-functions/opentelemetry-howto.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/articles/azure-functions/opentelemetry-howto.md b/articles/azure-functions/opentelemetry-howto.md index 54c7a04ac7a2b..6970fbdb0ab72 100644 --- a/articles/azure-functions/opentelemetry-howto.md +++ b/articles/azure-functions/opentelemetry-howto.md @@ -215,9 +215,9 @@ These instructions only apply for an OTLP exporter: ::: zone-end ::: zone pivot="programming-language-python" -1. Add an application setting named PYTHON_ENABLE_OPENTELEMETRY with value of True. +1. Add an application setting named `PYTHON_APPLICATIONINSIGHTS_ENABLE_TELEMETRY` with value of True. -1. Add this entry in your `requirements.txt` file: +1. Make sure the below library is in your `requirements.txt` file, whether from uncommenting or adding yourself: ### [Application Insights](#tab/app-insights) @@ -238,6 +238,10 @@ These instructions only apply for an OTLP exporter: ### [Application Insights](#tab/app-insights) + If you followed the above steps by setting the `PYTHON_APPLICATIONINSIGHTS_ENABLE_TELEMETRY`, you don't need to add any additional code and skip the below. + + If you would like to enable Application Insights collection manually without automatic instrumentation, add the following code: + ```python from azure.monitor.opentelemetry import configure_azure_monitor configure_azure_monitor() @@ -275,6 +279,8 @@ These instructions only apply for an OTLP exporter: --- +1. Refer to [Azure monitor Distro usage]https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/monitor/azure-monitor-opentelemetry#usage) documentation for how to configure the SDK. + ::: zone-end ## Considerations for OpenTelemetry From 3aed3056c20210026783c1d62341e45a3e9bbf52 Mon Sep 17 00:00:00 2001 From: Leighton Chen Date: Thu, 24 Jul 2025 07:32:08 -0800 Subject: [PATCH 2/3] Update opentelemetry-howto.md --- articles/azure-functions/opentelemetry-howto.md | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/articles/azure-functions/opentelemetry-howto.md b/articles/azure-functions/opentelemetry-howto.md index 6970fbdb0ab72..8f6d908258ff2 100644 --- a/articles/azure-functions/opentelemetry-howto.md +++ b/articles/azure-functions/opentelemetry-howto.md @@ -215,7 +215,19 @@ These instructions only apply for an OTLP exporter: ::: zone-end ::: zone pivot="programming-language-python" -1. Add an application setting named `PYTHON_APPLICATIONINSIGHTS_ENABLE_TELEMETRY` with value of True. +1. Add the following application settings with value of True. + + ### [Application Insights](#tab/app-insights) + + ```text + PYTHON_APPLICATIONINSIGHTS_ENABLE_TELEMETRY + ``` + ### [OTLP Exporter](#tab/otlp-export) + + ```text + PYTHON_ENABLE_OPENTELEMETRY + ``` + --- 1. Make sure the below library is in your `requirements.txt` file, whether from uncommenting or adding yourself: From 85cdc1257e329b12adafc8d8d4a0a21929a1d1d3 Mon Sep 17 00:00:00 2001 From: Leighton Chen Date: Thu, 24 Jul 2025 09:12:05 -0800 Subject: [PATCH 3/3] Update opentelemetry-howto.md --- articles/azure-functions/opentelemetry-howto.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/articles/azure-functions/opentelemetry-howto.md b/articles/azure-functions/opentelemetry-howto.md index 8f6d908258ff2..ebee852745582 100644 --- a/articles/azure-functions/opentelemetry-howto.md +++ b/articles/azure-functions/opentelemetry-howto.md @@ -234,7 +234,7 @@ These instructions only apply for an OTLP exporter: ### [Application Insights](#tab/app-insights) ```text - azure.monitor.opentelemetry + azure-monitor-opentelemetry ``` ### [OTLP Exporter](#tab/otlp-export)