diff --git a/src/Microsoft.DotNet.Helix/Sdk/tools/xharness-runner/xharness-event-processor.py b/src/Microsoft.DotNet.Helix/Sdk/tools/xharness-runner/xharness-event-processor.py index 766ccabb798..12a4f118376 100644 --- a/src/Microsoft.DotNet.Helix/Sdk/tools/xharness-runner/xharness-event-processor.py +++ b/src/Microsoft.DotNet.Helix/Sdk/tools/xharness-runner/xharness-event-processor.py @@ -186,7 +186,7 @@ def analyze_operation(command: str, platform: str, device: str, is_device: bool, device = operation.get('device') target = operation.get('target') target_os = operation.get('targetOS') - is_device = operation.get('isDevice', False) + is_device = operation.get('isDevice', None) try: analyze_operation(command, platform, device, is_device, target, exit_code) @@ -194,9 +194,11 @@ def analyze_operation(command: str, platform: str, device: str, is_device: bool, print(f' Failed to analyze operation: {e}') custom_dimensions = dict() - custom_dimensions['command'] = operation['command'] - custom_dimensions['platform'] = operation['platform'] - custom_dimensions['isDevice'] = 'true' if operation['isDevice'] else 'false' + custom_dimensions['command'] = command + custom_dimensions['platform'] = platform + + if is_device is not None: + custom_dimensions['isDevice'] = 'true' if str(is_device).lower() == 'true' else 'false' if 'target' in operation: if 'targetOS' in operation: