Skip to content

added firestore analytics for presubmit dashboard - #5172

Open
ievdokdm wants to merge 1 commit into
flutter:mainfrom
ievdokdm:196140-firebase-analytics
Open

ievdokdm wants to merge 1 commit into
flutter:mainfrom
ievdokdm:196140-firebase-analytics

Conversation

@ievdokdm

@ievdokdm ievdokdm commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Added firebase analytics for:

  • presubmit_page_open
  • presubmit_rerun_job
  • presubmit_rerun_failed_jobs
  • presubmit_filter_dialog
  • presubmit_view_luci_ui
  • presubmit_analyze_logs_gemini

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

@flutter-dashboard flutter-dashboard Bot added the CICD Run CI/CD label Nov 6, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@ievdokdm
ievdokdm requested a review from jtmcdole November 6, 2026 23:12
@ievdokdm ievdokdm changed the title added firestore analytics fore presubmit dashboard added firestore analytics for presubmit dashboard Nov 6, 2026
@ievdokdm
ievdokdm force-pushed the 196140-firebase-analytics branch from 1374b35 to 8bdf407 Compare November 10, 2026 17:48

@jtmcdole jtmcdole left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: we need to wait on the PDD approval before landing.


final FirebaseAnalytics? _analytics;

Future<void> logPresubmitPageOpen({

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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',

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@jtmcdole jtmcdole mentioned this pull request Nov 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CICD Run CI/CD

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Firebase Analytics

2 participants