Repository navigation
Conversation
There was a problem hiding this comment.
Code Review
This pull request integrates Firebase Analytics into the Flutter dashboard to track user actions on the presubmit page, such as page views, job reruns, filter dialog interactions, and Gemini log analysis. Feedback on the changes highlights critical compile-time errors in the newly created FirebaseAnalyticsService where invalid Dart syntax (e.g., ?pr, ?sha, ?buildId) was used in map literals. To resolve these issues, the reviewer recommended using Dart's collection if elements to conditionally include these parameters.
1374b35 to
8bdf407
Compare
jtmcdole
left a comment
There was a problem hiding this comment.
Note: we need to wait on the PDD approval before landing.
|
|
||
| final FirebaseAnalytics? _analytics; | ||
|
|
||
| Future<void> logPresubmitPageOpen({ |
There was a problem hiding this comment.
If these are all unawaited at the actual callsite; why not make them void? I know you "await" them in testing, but I would think "logging is never waited on" is more strongly signaled through void.
| String? sha, | ||
| }) async { | ||
| await _logEvent( | ||
| name: 'presubmit_page_open', |
There was a problem hiding this comment.
instead of encoding the string here, this could be constants in each of the files that use them. Then you'd only need one "log" for:
log(String name, {String? pr, String? sha, String? repo, String? jobName, int? buildNumber, String? buildId});That sucks for logging so maybe each "logThisEvent" goes into the file that uses it rather than FirebaseAnalyticsService needing to know about it.
Added firebase analytics for:
Analytics can be viewed at: https://firebase.corp.google.com/project/flutter-dashboard/analytics/app/android:com.appspot.flutter_dashboard.dashboard/streamview/realtime~2Foverview%3Ffpn%3D308150028417
fix: flutter/flutter#196140