Skip to content

Commit 8f8c447

Browse files
committed
Update opentelemetry-enable.md
1 parent c2d9192 commit 8f8c447

File tree

1 file changed

+13
-11
lines changed

1 file changed

+13
-11
lines changed

articles/azure-monitor/app/opentelemetry-enable.md

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -484,11 +484,11 @@ provider.register();
484484

485485
#### [Python](#tab/python)
486486

487-
Calling `configure_azure_monitor` will already automatically use the
488-
`ApplicationInsightsSampler` under the hood, which offers compatibility with
489-
Application Insights SDKs and performs sampling for your telemetry. You can pass
490-
the `sampling_ratio` parameter, which takes a value between 0 and 1 inclusive. A
491-
rate of 0.1 means approximately 10% of your traces will be sent.
487+
The `configure_azure_monitor()` function will automatically utilize
488+
ApplicationInsightsSampler for compatibility with Application Insights SDKs and
489+
to sample your telemetry. The `sampling_ratio` parameter can be used to specify
490+
the sampling rate, with a valid range of 0 to 1, where 0 is 0% and 1 is 100%.
491+
For example, a value of 0.1 means 10% of your traces will be sent.
492492

493493
```python
494494
from azure.monitor.opentelemetry import configure_azure_monitor
@@ -1347,9 +1347,11 @@ Coming soon.
13471347

13481348
#### Use the OpenTelemetry API
13491349

1350-
The simplest way to add your own spans is by using OpenTelemetry's `@WithSpan` annotation.
1350+
The OpenTelemetry API can be used to add your own spans, which will appear in
1351+
the `requests` and `dependencies` tables in Application Insights.
13511352

1352-
Spans populate the `requests` and `dependencies` tables in Application Insights.
1353+
The code example shows how to use the `tracer.start_as_current_span()` method to
1354+
start, make the span current, and end the span within its context.
13531355

13541356
```python
13551357
...
@@ -1367,7 +1369,7 @@ with tracer.start_as_current_span("my first span") as span:
13671369

13681370
```
13691371

1370-
By default, the span will end up in the `dependencies` table with dependency type `InProc`.
1372+
By default, the span will be in the `dependencies` table with a dependency type of `InProc`.
13711373

13721374
If your method represents a background job that isn't already captured by
13731375
auto-instrumentation, we recommend that you set the attribute `kind =
@@ -1798,11 +1800,11 @@ Coming soon.
17981800

17991801
#### [Python](#tab/python)
18001802

1801-
The Python [logging](https://docs.python.org/3/howto/logging.html) library is [auto-instrumented](#logs). Attaching custom dimensions to your logs by passing a dictionary into the `extra` argument of your logs.
1803+
The Python [logging](https://docs.python.org/3/howto/logging.html) library is [auto-instrumented](#logs). You can attach custom dimensions to your logs by passing a dictionary into the `extra` argument of your logs.
18021804

18031805
```python
18041806
...
1805-
logger.warning("WARNGIN: Warning log with properties", extra={"key1": "value1"})
1807+
logger.warning("WARNING: Warning log with properties", extra={"key1": "value1"})
18061808
...
18071809

18081810
```
@@ -1919,7 +1921,7 @@ Use the add [custom property example](#add-a-custom-property-to-a-span), but rep
19191921

19201922
1. Exclude the URL option provided by many HTTP instrumentation libraries.
19211923

1922-
The following example shows how to exclude a certain URL from being tracked by using the [Flask](https://github.com/open-telemetry/opentelemetry-python-contrib/tree/main/instrumentation/opentelemetry-instrumentation-flask) instrumentation configuration options in `configure_azure_monitor()`.
1924+
The following example shows how to exclude a specific URL from being tracked by using the [Flask](https://github.com/open-telemetry/opentelemetry-python-contrib/tree/main/instrumentation/opentelemetry-instrumentation-flask) instrumentation configuration options in the `configure_azure_monitor()` function.
19231925
19241926
```python
19251927
...

0 commit comments

Comments
 (0)