alexeyinkin commented on code in PR #24957:
URL: https://github.com/apache/beam/pull/24957#discussion_r1131245478
##########
learning/tour-of-beam/frontend/lib/models/event_context.dart:
##########
@@ -18,27 +18,31 @@
import 'package:equatable/equatable.dart';
-class AnalyticsEvent with EquatableMixin {
- final String action;
- final String category;
- final String? label;
- final Map<String, String>? parameters;
- final int? value;
+const _none = 'none';
- AnalyticsEvent({
- required this.action,
- required this.category,
- this.label,
- this.parameters,
- this.value,
+/// Basic information of the Tour of Beam state to augment analytics events.
+class TobEventContext with EquatableMixin {
+ const TobEventContext({
+ required this.sdkId,
+ required this.unitId,
});
+ final String? sdkId;
+ final String? unitId;
Review Comment:
We want a parameter to be nullable when 'no value' is a valid case.
We want a parameter to be required when it is important enough that we want
a compile-time guarantee that we never forget it and never let it silently
default to something.
In this case we want both given how hard analytics is to debug.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]