Commit 963b90ed authored by Devon Carew's avatar Devon Carew Committed by GitHub

send the FLUTTER_HOST env var as analytics' app installer ID (#10889)

parent b231006c
...@@ -9,12 +9,11 @@ import 'package:usage/usage_io.dart'; ...@@ -9,12 +9,11 @@ import 'package:usage/usage_io.dart';
import 'base/context.dart'; import 'base/context.dart';
import 'base/os.dart'; import 'base/os.dart';
import 'base/platform.dart';
import 'base/utils.dart'; import 'base/utils.dart';
import 'globals.dart'; import 'globals.dart';
import 'version.dart'; import 'version.dart';
// TODO(devoncarew): We'll want to find a way to send (sanitized) command parameters.
const String _kFlutterUA = 'UA-67589403-6'; const String _kFlutterUA = 'UA-67589403-6';
Usage get flutterUsage => Usage.instance; Usage get flutterUsage => Usage.instance;
...@@ -25,10 +24,14 @@ class Usage { ...@@ -25,10 +24,14 @@ class Usage {
final String version = versionOverride ?? FlutterVersion.getVersionString(whitelistBranchName: true); final String version = versionOverride ?? FlutterVersion.getVersionString(whitelistBranchName: true);
_analytics = new AnalyticsIO(_kFlutterUA, settingsName, version); _analytics = new AnalyticsIO(_kFlutterUA, settingsName, version);
// Report a more detailed OS version string than package:usage does by // Report a more detailed OS version string than package:usage does by default.
// default. Also, send the branch name as the "channel".
_analytics.setSessionValue('cd1', os.name); _analytics.setSessionValue('cd1', os.name);
// Send the branch name as the "channel".
_analytics.setSessionValue('cd2', FlutterVersion.getBranchName(whitelistBranchName: true)); _analytics.setSessionValue('cd2', FlutterVersion.getBranchName(whitelistBranchName: true));
// Record the host as the application installer ID - the context that flutter_tools is running in.
if (platform.environment.containsKey('FLUTTER_HOST')) {
_analytics.setSessionValue('aiid', platform.environment['FLUTTER_HOST']);
}
bool runningOnCI = false; bool runningOnCI = false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment