Skip to content

Commit c7cc185

Browse files
authored
Add telemetry when receiving corrupt data from Azure Copilot (#294)
1 parent 9aaefab commit c7cc185

File tree

1 file changed

+3
-1
lines changed
  • shell/agents/Microsoft.Azure.Agent

1 file changed

+3
-1
lines changed

shell/agents/Microsoft.Azure.Agent/Utils.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,9 @@ private CorruptDataException(string message)
8787

8888
internal static CorruptDataException Create(string message, CopilotActivity activity)
8989
{
90-
return new CorruptDataException($"Unexpected copilot activity received. {message}\n\n{activity.Serialize()}\n");
90+
string errorMessage = $"Unexpected copilot activity received. {message}\n\n{activity.Serialize()}\n";
91+
Telemetry.Trace(AzTrace.Exception(errorMessage));
92+
return new CorruptDataException(errorMessage);
9193
}
9294
}
9395

0 commit comments

Comments
 (0)