Skip to content

Commit bb97fda

Browse files
committed
Merge remote-tracking branch 'lzchen/patch-1' into fixup
2 parents 7943ff4 + 85cdc12 commit bb97fda

File tree

1 file changed

+21
-3
lines changed

1 file changed

+21
-3
lines changed

articles/azure-functions/opentelemetry-howto.md

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -215,14 +215,26 @@ 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 the following application settings with value of True.
219219
220-
1. Add this entry in your `requirements.txt` file:
220+
### [Application Insights](#tab/app-insights)
221+
222+
```text
223+
PYTHON_APPLICATIONINSIGHTS_ENABLE_TELEMETRY
224+
```
225+
### [OTLP Exporter](#tab/otlp-export)
226+
227+
```text
228+
PYTHON_ENABLE_OPENTELEMETRY
229+
```
230+
---
231+
232+
1. Make sure the below library is in your `requirements.txt` file, whether from uncommenting or adding yourself:
221233
222234
### [Application Insights](#tab/app-insights)
223235
224236
```text
225-
azure.monitor.opentelemetry
237+
azure-monitor-opentelemetry
226238
```
227239
### [OTLP Exporter](#tab/otlp-export)
228240
@@ -238,6 +250,10 @@ These instructions only apply for an OTLP exporter:
238250
239251
### [Application Insights](#tab/app-insights)
240252
253+
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.
254+
255+
If you would like to enable Application Insights collection manually without automatic instrumentation, add the following code:
256+
241257
```python
242258
from azure.monitor.opentelemetry import configure_azure_monitor
243259
configure_azure_monitor()
@@ -275,6 +291,8 @@ These instructions only apply for an OTLP exporter:
275291
276292
---
277293
294+
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.
295+
278296
::: zone-end
279297
## Considerations for OpenTelemetry
280298

0 commit comments

Comments
 (0)