You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/azure-functions/opentelemetry-howto.md
+8-2Lines changed: 8 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -215,9 +215,9 @@ These instructions only apply for an OTLP exporter:
215
215
216
216
::: zone-end
217
217
::: 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.
219
219
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:
221
221
222
222
### [Application Insights](#tab/app-insights)
223
223
@@ -238,6 +238,10 @@ These instructions only apply for an OTLP exporter:
238
238
239
239
### [Application Insights](#tab/app-insights)
240
240
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
+
241
245
```python
242
246
from azure.monitor.opentelemetry import configure_azure_monitor
243
247
configure_azure_monitor()
@@ -275,6 +279,8 @@ These instructions only apply for an OTLP exporter:
275
279
276
280
---
277
281
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.
0 commit comments