Skip to content

Commit d4995d4

Browse files
Add more parameters (androidAppId and iosBundleId) in devtools events. (#295)
Co-authored-by: Andrew Kolos <[email protected]>
1 parent e5b699f commit d4995d4

File tree

5 files changed

+16
-4
lines changed

5 files changed

+16
-4
lines changed

pkgs/unified_analytics/CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
## 6.1.4-wip
1+
## 6.1.4
22

33
- Fix formatting and remove dependency on `package:intl`.
44
- Remove direct usage of `package:path` in favor of `package:file`.
5+
- Added `androidAppId` and `iosBundleId` to the `Event.devtoolsEvent` constructor.
56

67
## 6.1.3
78

pkgs/unified_analytics/lib/src/constants.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ const int kMaxLogFileSize = 25 * (1 << 20);
8787
const String kLogFileName = 'dart-flutter-telemetry.log';
8888

8989
/// The current version of the package, should be in line with pubspec version.
90-
const String kPackageVersion = '6.1.4-wip';
90+
const String kPackageVersion = '6.1.4';
9191

9292
/// The minimum length for a session.
9393
const int kSessionDurationMinutes = 30;

pkgs/unified_analytics/lib/src/event.dart

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -399,6 +399,10 @@ final class Event {
399399
int? rootSetCount,
400400
int? rowCount,
401401
int? inspectorTreeControllerId,
402+
403+
// DeepLinkScreenMetrics
404+
String? androidAppId,
405+
String? iosBundleId,
402406
}) : eventName = DashEvent.devtoolsEvent,
403407
eventData = {
404408
'eventCategory': eventCategory,
@@ -446,6 +450,9 @@ final class Event {
446450
if (rowCount != null) 'rowCount': rowCount,
447451
if (inspectorTreeControllerId != null)
448452
'inspectorTreeControllerId': inspectorTreeControllerId,
453+
// DeepLinkScreenMetrics
454+
if (androidAppId != null) 'androidAppId': androidAppId,
455+
if (iosBundleId != null) 'iosBundleId': iosBundleId,
449456
};
450457

451458
/// Event that contains the results for a specific doctor validator.

pkgs/unified_analytics/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: >-
55
# LINT.IfChange
66
# When updating this, keep the version consistent with the changelog and the
77
# value in lib/src/constants.dart.
8-
version: 6.1.4-wip
8+
version: 6.1.4
99
# LINT.ThenChange(lib/src/constants.dart)
1010
repository: https://github.com/dart-lang/tools/tree/main/pkgs/unified_analytics
1111

pkgs/unified_analytics/test/event_test.dart

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -587,6 +587,8 @@ void main() {
587587
rootSetCount: 123,
588588
rowCount: 123,
589589
inspectorTreeControllerId: 123,
590+
androidAppId: 'androidAppId',
591+
iosBundleId: 'iosBundleId',
590592
);
591593

592594
final constructedEvent = generateEvent();
@@ -622,7 +624,9 @@ void main() {
622624
expect(constructedEvent.eventData['rootSetCount'], 123);
623625
expect(constructedEvent.eventData['rowCount'], 123);
624626
expect(constructedEvent.eventData['inspectorTreeControllerId'], 123);
625-
expect(constructedEvent.eventData.length, 28);
627+
expect(constructedEvent.eventData['androidAppId'], 'androidAppId');
628+
expect(constructedEvent.eventData['iosBundleId'], 'iosBundleId');
629+
expect(constructedEvent.eventData.length, 30);
626630
});
627631

628632
test('Confirm all constructors were checked', () {

0 commit comments

Comments
 (0)