[flutter_tool] Add analytics events for ios-mdns fallback success/failure (#41482)
This commit is contained in:
@@ -377,7 +377,7 @@ class IOSDevice extends Device {
|
||||
return LaunchResult.succeeded(observatoryUri: localUri);
|
||||
}
|
||||
} catch (error) {
|
||||
printError('Failed to establish a debug connection with $id: $error');
|
||||
printError('Failed to establish a debug connection with $id using mdns: $error');
|
||||
}
|
||||
|
||||
// Fallback to manual protocol discovery.
|
||||
@@ -387,13 +387,15 @@ class IOSDevice extends Device {
|
||||
printTrace('Waiting for observatory port.');
|
||||
localUri = await observatoryDiscovery.uri;
|
||||
if (localUri != null) {
|
||||
UsageEvent('ios-mdns', 'fallback-success').send();
|
||||
return LaunchResult.succeeded(observatoryUri: localUri);
|
||||
}
|
||||
} catch (error) {
|
||||
printError('Failed to establish a debug connection with $id: $error');
|
||||
printError('Failed to establish a debug connection with $id using logs: $error');
|
||||
} finally {
|
||||
await observatoryDiscovery?.cancel();
|
||||
}
|
||||
UsageEvent('ios-mdns', 'fallback-failure').send();
|
||||
return LaunchResult.failed();
|
||||
} finally {
|
||||
installStatus.stop();
|
||||
|
||||
Reference in New Issue
Block a user