File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
articles/azure-monitor/app Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -644,6 +644,7 @@ from azure.identity import ManagedIdentityCredential
644
644
from azure .monitor .opentelemetry import configure_azure_monitor
645
645
from opentelemetry import trace
646
646
647
+ # Configure the Distro to authenticate with Azure Monitor using a managed identity credential.
647
648
credential = ManagedIdentityCredential (client_id = " <client_id>" )
648
649
configure_azure_monitor (
649
650
connection_string = " your-connection-string" ,
@@ -665,6 +666,7 @@ from azure.identity import ClientSecretCredential
665
666
from azure .monitor .opentelemetry import configure_azure_monitor
666
667
from opentelemetry import trace
667
668
669
+ # Configure the Distro to authenticate with Azure Monitor using a client secret credential.
668
670
credential = ClientSecretCredential (
669
671
tenant_id = " <tenant_id" ,
670
672
client_id = " <client_id>" ,
@@ -675,7 +677,7 @@ configure_azure_monitor(
675
677
credential = credential ,
676
678
)
677
679
678
- with tracer .start_as_current_span (" hello with aad client identity" ):
680
+ with tracer .start_as_current_span (" hello with aad client secret identity" ):
679
681
print (" Hello, World!" )
680
682
681
683
```
You can’t perform that action at this time.
0 commit comments