Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/Common/AzurePSCmdlet.cs
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,6 @@ private void WriteSecretsWarningMessage()
{
WriteWarning(string.Format(Resources.DisplaySecretsWarningMessage, MyInvocation.InvocationName, string.Join(", ", sanitizerInfo.DetectedProperties)));
}
WriteDebug($"Sanitizer took {sanitizerInfo.SanitizeDuration.TotalMilliseconds}ms to process the object of cmdlet {MyInvocation.InvocationName}.");
}
}
}
Expand Down
19 changes: 12 additions & 7 deletions src/Common/MetricHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -690,22 +690,27 @@ public override string ToString()
StringBuilder sb = new StringBuilder("AzureQoSEvent: ");
if (ShowTelemetry)
{
foreach(PropertyDescriptor descriptor in TypeDescriptor.GetProperties((this)))
{
string name = descriptor.Name;
object value = descriptor.GetValue(this);
sb.Append($"{name}: {value}; ");
}
foreach (PropertyDescriptor descriptor in TypeDescriptor.GetProperties((this)))
{
string name = descriptor.Name;
object value = descriptor.GetValue(this);
sb.Append($"{name}: {value}; ");
}
//InstallationId and InternalCalledCmdlets are properties of MetricHelper and not in qosEventObject.
sb.Append($"InternalCalledCmdlets: {Microsoft.WindowsAzure.Commands.Common.MetricHelper.InternalCalledCmdlets}; InstallaionId: {Microsoft.WindowsAzure.Commands.Common.MetricHelper.InstallationId}");
}
else
{
sb = sb.Append($" Module: {ModuleName}:{ModuleVersion}; CommandName: {CommandName}; PSVersion: {PSVersion}");
sb.Append($" Module: {ModuleName}:{ModuleVersion}; CommandName: {CommandName}; PSVersion: {PSVersion}");
}

sb.Append($"; IsSuccess: {IsSuccess}; Duration: {Duration}");

if (SanitizerInfo?.ShowSecretsWarning == true)
{
sb.Append($"; SanitizeDuration: {SanitizerInfo.SanitizeDuration}");
}

if (Exception != null)
{
sb.Append($"; Exception: {Exception.Message};");
Expand Down