Skip to content

Commit 45428ee

Browse files
authored
Update Python opentelemetry how-to
1 parent 79ff9fb commit 45428ee

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

articles/azure-functions/opentelemetry-howto.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,9 +215,9 @@ These instructions only apply for an OTLP exporter:
215215
216216
::: zone-end
217217
::: zone pivot="programming-language-python"
218-
1. Add an application setting named PYTHON_ENABLE_OPENTELEMETRY with value of True.
218+
1. Add an application setting named `PYTHON_APPLICATIONINSIGHTS_ENABLE_TELEMETRY` with value of True.
219219
220-
1. Add this entry in your `requirements.txt` file:
220+
1. Make sure the below library is in your `requirements.txt` file, whether from uncommenting or adding yourself:
221221
222222
### [Application Insights](#tab/app-insights)
223223
@@ -238,6 +238,10 @@ These instructions only apply for an OTLP exporter:
238238
239239
### [Application Insights](#tab/app-insights)
240240
241+
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.
242+
243+
If you would like to enable Application Insights collection manually without automatic instrumentation, add the following code:
244+
241245
```python
242246
from azure.monitor.opentelemetry import configure_azure_monitor
243247
configure_azure_monitor()
@@ -275,6 +279,8 @@ These instructions only apply for an OTLP exporter:
275279
276280
---
277281
282+
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.
283+
278284
::: zone-end
279285
## Considerations for OpenTelemetry
280286

0 commit comments

Comments
 (0)