Skip to content

Commit a5f1772

Browse files
committed
Add skip condition to LogQosEvent
1 parent 841eee4 commit a5f1772

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/Common/Commands.Common/AzurePSCmdlet.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -537,8 +537,14 @@ protected void InitializeQosEvent()
537537
protected void LogQosEvent(bool waitForMetricSending = false)
538538
{
539539
QosEvent.FinishQosEvent();
540+
//TODO change to debug
540541
WriteVerbose(QosEvent.ToString());
541542

543+
if (!IsUsageMetricEnabled && (!IsErrorMetricEnabled || QosEvent.IsSuccess))
544+
{
545+
return;
546+
}
547+
542548
try
543549
{
544550
MetricHelper.LogQoSEvent(QosEvent, IsUsageMetricEnabled, IsErrorMetricEnabled);

0 commit comments

Comments
 (0)