Skip to content

Commit 229b9f4

Browse files
authored
Add exception type to telemetry if execution is failed (#204)
* Add exception type to telemetry if execution is failed * Sort using
1 parent 8a62a28 commit 229b9f4

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Common/MetricHelper.cs

+5-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
using System.Collections.Generic;
2525
using System.Diagnostics;
2626
using System.Management.Automation.Host;
27-
using System.Net.Http.Headers;
2827
using System.Security.Cryptography;
2928
using System.Text;
3029

@@ -285,6 +284,11 @@ private void PopulatePropertiesFromQos(AzurePSQoSEvent qos, IDictionary<string,
285284
eventProperties.Add("subscription-id", qos.SubscriptionId);
286285
eventProperties.Add("tenant-id", qos.TenantId);
287286

287+
if(qos.Exception != null)
288+
{
289+
eventProperties.Add("exception-type", qos.Exception.GetType().ToString());
290+
}
291+
288292
if (qos.InputFromPipeline != null)
289293
{
290294
eventProperties.Add("InputFromPipeline", qos.InputFromPipeline.Value.ToString());

0 commit comments

Comments
 (0)