Skip to content

Commit 7ac37ea

Browse files
authored
Update opentelemetry-configuration.md
1 parent 6fafb0f commit 7ac37ea

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -638,15 +638,15 @@ Azure Monitor OpenTelemetry Distro for Python support the credential classes pro
638638

639639
If using `ManagedIdentityCredential`
640640
```python
641-
import os
642-
# You will need to install azure-identity
641+
# Import the `ManagedIdentityCredential` class from the `azure.identity` package.
643642
from azure.identity import ManagedIdentityCredential
643+
# Import the `configure_azure_monitor()` function from the `azure.monitor.opentelemetry` package.
644644
from azure.monitor.opentelemetry import configure_azure_monitor
645645
from opentelemetry import trace
646646

647647
credential = ManagedIdentityCredential(client_id="<client_id>")
648648
configure_azure_monitor(
649-
connection_string=os.environ["APPLICATIONINSIGHTS_CONNECTION_STRING"],
649+
connection_string="your-connection-string",
650650
credential=credential,
651651
)
652652

@@ -659,9 +659,9 @@ with tracer.start_as_current_span("hello with aad managed identity"):
659659

660660
If using `ClientSecretCredential`
661661
```python
662-
import os
663-
# You will need to install azure-identity
662+
# Import the `ClientSecretCredential` class from the `azure.identity` package.
664663
from azure.identity import ClientSecretCredential
664+
# Import the `configure_azure_monitor()` function from the `azure.monitor.opentelemetry` package.
665665
from azure.monitor.opentelemetry import configure_azure_monitor
666666
from opentelemetry import trace
667667

@@ -671,7 +671,7 @@ credential = ClientSecretCredential(
671671
client_secret="<client_secret>",
672672
)
673673
configure_azure_monitor(
674-
connection_string=os.environ["APPLICATIONINSIGHTS_CONNECTION_STRING"],
674+
connection_string="your-connection-string",
675675
credential=credential,
676676
)
677677

0 commit comments

Comments
 (0)