Skip to content

Commit

Permalink
Remove any data entries with a null value in the Event.exception
Browse files Browse the repository at this point in the history
…constructor. (#1191)
  • Loading branch information
kenzieschmoll authored Nov 7, 2024
1 parent e331623 commit c39ce5f
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 4 deletions.
3 changes: 3 additions & 0 deletions pkgs/unified_analytics/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## 6.1.5
- Remove any `data` entries with a null value in the `Event.exception` constructor.

## 6.1.4

- Fix formatting and remove dependency on `package:intl`.
Expand Down
2 changes: 1 addition & 1 deletion pkgs/unified_analytics/lib/src/constants.dart
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ const int kMaxLogFileSize = 25 * (1 << 20);
const String kLogFileName = 'dart-flutter-telemetry.log';

/// The current version of the package, should be in line with pubspec version.
const String kPackageVersion = '6.1.4';
const String kPackageVersion = '6.1.5';

/// The minimum length for a session.
const int kSessionDurationMinutes = 30;
Expand Down
2 changes: 1 addition & 1 deletion pkgs/unified_analytics/lib/src/event.dart
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,7 @@ final class Event {
}) : eventName = DashEvent.exception,
eventData = {
'exception': exception,
...data,
...data..removeWhere((key, value) => value == null),
};

/// Event that is emitted from the flutter tool when a build invocation
Expand Down
2 changes: 1 addition & 1 deletion pkgs/unified_analytics/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description: >-
# LINT.IfChange
# When updating this, keep the version consistent with the changelog and the
# value in lib/src/constants.dart.
version: 6.1.4
version: 6.1.5
# LINT.ThenChange(lib/src/constants.dart)
repository: https://github.com/dart-lang/tools/tree/main/pkgs/unified_analytics

Expand Down
2 changes: 1 addition & 1 deletion pkgs/unified_analytics/test/event_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ void main() {
test('Event.exception constructed', () {
Event generateEvent() => Event.exception(
exception: 'exception',
data: {'foo': 'bar', 'baz': 1},
data: {'foo': 'bar', 'baz': 1, 'shouldBeRemoved': null},
);

final constructedEvent = generateEvent();
Expand Down

0 comments on commit c39ce5f

Please sign in to comment.