@@ -632,7 +632,7 @@ Azure Monitor OpenTelemetry Distro for Python support the credential classes pro
632
632
- We recommend `DefaultAzureCredential ` for local development .
633
633
- We recommend `ManagedIdentityCredential ` for system - assigned and user - assigned managed identities .
634
634
- For system - assigned , use the default constructor without parameters .
635
- - For user - assigned , provide the client ID to the constructor .
635
+ - For user - assigned , provide the ` client_id ` to the constructor .
636
636
- We recommend `ClientSecretCredential ` for service principals .
637
637
- Provide the tenant ID , client ID , and client secret to the constructor .
638
638
@@ -646,8 +646,8 @@ from opentelemetry import trace
646
646
647
647
credential = ManagedIdentityCredential (client_id = " <client_id>" )
648
648
configure_azure_monitor (
649
- connection_string = " your-connection-string" ,
650
- credential = credential ,
649
+ connection_string = " your-connection-string" ,
650
+ credential = credential ,
651
651
)
652
652
653
653
tracer = trace .get_tracer (__name__ )
@@ -671,8 +671,8 @@ credential = ClientSecretCredential(
671
671
client_secret = " <client_secret>" ,
672
672
)
673
673
configure_azure_monitor (
674
- connection_string = " your-connection-string" ,
675
- credential = credential ,
674
+ connection_string = " your-connection-string" ,
675
+ credential = credential ,
676
676
)
677
677
678
678
with tracer .start_as_current_span (" hello with aad client identity" ):
0 commit comments