2323using System . Management . Automation ;
2424using System . Management . Automation . Host ;
2525using System . Reflection ;
26+ using System . Linq ;
27+ using System . Globalization ;
2628
2729namespace Microsoft . Azure . Commands . ResourceManager . Common
2830{
@@ -140,9 +142,10 @@ protected override void PromptForDataCollectionProfileIfNotExists()
140142
141143 protected override void InitializeQosEvent ( )
142144 {
145+ var commandAlias = this . GetType ( ) . GetTypeInfo ( ) . GetCustomAttribute < CliCommandAliasAttribute > ( ) ;
143146 QosEvent = new AzurePSQoSEvent ( )
144147 {
145- CommandName = this . MyInvocation ? . MyCommand ? . Name ,
148+ CommandName = commandAlias != null ? "az " + commandAlias . CommandName : this . MyInvocation ? . MyCommand ? . Name ,
146149 ModuleName = this . GetType ( ) . GetTypeInfo ( ) . Assembly . GetName ( ) . Name ,
147150 ModuleVersion = this . GetType ( ) . GetTypeInfo ( ) . Assembly . GetName ( ) . Version . ToString ( ) ,
148151 ClientRequestId = this . _clientRequestId ,
@@ -151,7 +154,9 @@ protected override void InitializeQosEvent()
151154
152155 if ( this . MyInvocation != null && this . MyInvocation . BoundParameters != null )
153156 {
154- QosEvent . Parameters = string . Join ( "," , this . MyInvocation . BoundParameters . Keys ) ;
157+ QosEvent . Parameters = string . Join ( " " ,
158+ this . MyInvocation . BoundParameters . Keys . Select (
159+ s => string . Format ( CultureInfo . InvariantCulture , "--{0} xxx" , s . ToLowerInvariant ( ) ) ) ) ;
155160 }
156161
157162 if ( this . DefaultProfile ? . Context ? . Account ? . Id != null )
0 commit comments