From bb7e3f6045a5e7b23a04886f9206faec95dc85cb Mon Sep 17 00:00:00 2001 From: Zachary Anderson Date: Thu, 26 Sep 2019 13:41:11 -0700 Subject: [PATCH] [flutter_tools] Report iOS mDNS lookup failures to analytics (#41384) --- packages/flutter_tools/lib/src/ios/devices.dart | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/flutter_tools/lib/src/ios/devices.dart b/packages/flutter_tools/lib/src/ios/devices.dart index 9b62d776d1c..568d0b86a83 100644 --- a/packages/flutter_tools/lib/src/ios/devices.dart +++ b/packages/flutter_tools/lib/src/ios/devices.dart @@ -373,13 +373,15 @@ class IOSDevice extends Device { debuggingOptions.observatoryPort, ); if (localUri != null) { + UsageEvent('ios-mdns', 'success').send(); return LaunchResult.succeeded(observatoryUri: localUri); } } catch (error) { printError('Failed to establish a debug connection with $id: $error'); } - // Fallback to manual protocol discovery + // Fallback to manual protocol discovery. + UsageEvent('ios-mdns', 'failure').send(); printTrace('mDNS lookup failed, attempting fallback to reading device log.'); try { printTrace('Waiting for observatory port.');