@@ -119,7 +119,7 @@ public string HashMacAddress
119119 try
120120 {
121121 var macAddress = _networkHelper . GetMACAddress ( ) ;
122- _hashMacAddress = string . IsNullOrWhiteSpace ( macAddress )
122+ _hashMacAddress = string . IsNullOrWhiteSpace ( macAddress )
123123 ? null : GenerateSha256HashString ( macAddress ) ? . Replace ( "-" , string . Empty ) ? . ToLowerInvariant ( ) ;
124124 }
125125 catch
@@ -255,7 +255,7 @@ private void LogExceptionEvent(AzurePSQoSEvent qos)
255255 Dictionary < string , string > eventProperties = new Dictionary < string , string > ( ) ;
256256 LoadTelemetryClientContext ( qos , client . Context ) ;
257257 PopulatePropertiesFromQos ( qos , eventProperties ) ;
258- // qos.Exception contains exception message which may contain Users specific data.
258+ // qos.Exception contains exception message which may contain Users specific data.
259259 // We should not collect users specific data.
260260 eventProperties . Add ( "Message" , "Message removed due to PII." ) ;
261261 eventProperties . Add ( "StackTrace" , qos . Exception . StackTrace ) ;
@@ -401,7 +401,7 @@ private void PopulatePropertiesFromQos(AzurePSQoSEvent qos, IDictionary<string,
401401 ? qos . Exception . Data [ AzurePSErrorDataKeys . ErrorKindKey ] . ToString ( )
402402 : null ;
403403 cloudErrorCode = ( string ) qos . Exception . Data [ AzurePSErrorDataKeys . CloudErrorCodeKey ] ;
404- // For the time being, we consider ResourceNotFound and ResourceGroupNotFound as user's input error.
404+ // For the time being, we consider ResourceNotFound and ResourceGroupNotFound as user's input error.
405405 // We are considering if ResourceNotFound should be false positive error.
406406 if ( ( "ResourceNotFound" . Equals ( cloudErrorCode ) || "ResourceGroupNotFound" . Equals ( cloudErrorCode ) )
407407 && existingErrorKind != ErrorKind . FalseError )
@@ -413,7 +413,7 @@ private void PopulatePropertiesFromQos(AzurePSQoSEvent qos, IDictionary<string,
413413 StringBuilder sb = new StringBuilder ( ) ;
414414 foreach ( var key in qos . Exception . Data ? . Keys )
415415 {
416- if ( AzurePSErrorDataKeys . IsKeyPredefined ( key . ToString ( ) )
416+ if ( AzurePSErrorDataKeys . IsKeyPredefined ( key . ToString ( ) )
417417 && ! AzurePSErrorDataKeys . HttpStatusCode . Equals ( key ) )
418418 {
419419 if ( sb . Length > 0 )
@@ -481,8 +481,8 @@ private static string ConvertFrameToString(System.Diagnostics.StackFrame frame)
481481
482482 public bool IsMetricTermAccepted ( )
483483 {
484- return _profile != null
485- && _profile . EnableAzureDataCollection . HasValue
484+ return _profile != null
485+ && _profile . EnableAzureDataCollection . HasValue
486486 && _profile . EnableAzureDataCollection . Value ;
487487 }
488488
@@ -604,6 +604,12 @@ public class AzurePSQoSEvent
604604 public string TenantId { get ; set ; }
605605 public bool SurveyPrompted { get ; set ; }
606606
607+ /// <summary>
608+ /// Appear in certain resource creation commands like New-AzVM. See RegionalRecommender (PS repo).
609+ /// Represent the recommended region if we do have recommendation.
610+ /// </summary>
611+ public string DisplayRegionIdentified { get ; set ; }
612+
607613 public string ParameterSetName { get ; set ; }
608614 public string InvocationName { get ; set ; }
609615 public Dictionary < string , string > CustomProperties { get ; private set ; }
@@ -637,8 +643,8 @@ public void FinishQosEvent()
637643 public override string ToString ( )
638644 {
639645 StringBuilder sb = new StringBuilder ( "AzureQoSEvent: " ) ;
640- if ( ShowTelemetry )
641- {
646+ if ( ShowTelemetry )
647+ {
642648 foreach ( PropertyDescriptor descriptor in TypeDescriptor . GetProperties ( ( this ) ) )
643649 {
644650 string name = descriptor . Name ;
@@ -652,7 +658,7 @@ public override string ToString()
652658 {
653659 sb = sb . Append ( $ " Module: { ModuleName } :{ ModuleVersion } ; CommandName: { CommandName } ; PSVersion: { PSVersion } ") ;
654660 }
655-
661+
656662 sb . Append ( $ "; IsSuccess: { IsSuccess } ; Duration: { Duration } ") ;
657663
658664 if ( Exception != null )
0 commit comments