feat(observability): add Firebase Performance Monitoring with opt-in toggle#35
Merged
using-system merged 10 commits intomainfrom Apr 25, 2026
Merged
Conversation
- Update crashlytics_preference_storage.dart default from false to true - Update storage tests to expect true as default - Update presentation tests to verify switch defaults to on
There was a problem hiding this comment.
Pull request overview
Adds Firebase Performance Monitoring to the app’s observability stack, with a new Settings toggle and startup initialization alongside Crashlytics.
Changes:
- Add
firebase_performancedependency and wire up collection enabling at app startup. - Introduce Performance monitoring preference storage/provider + a new
PerformanceToggleTilein Settings > Observability. - Change Crashlytics preference default to enabled-by-default and update tests/l10n/spec accordingly.
Reviewed changes
Copilot reviewed 17 out of 18 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
pubspec.yaml |
Adds firebase_performance dependency constraint. |
pubspec.lock |
Locks resolved firebase_performance and transitive packages. |
lib/main.dart |
Initializes Firebase Performance collection enabled flag on startup. |
lib/features/observability/providers.dart |
Adds Riverpod storage/provider + notifier for performance preference and toggling Firebase Performance collection. |
lib/features/observability/data/performance_preference_storage.dart |
New SharedPreferences-backed storage for performance monitoring preference (default enabled). |
lib/features/observability/data/crashlytics_preference_storage.dart |
Changes Crashlytics preference default to enabled. |
lib/features/observability/presentation/performance_toggle_tile.dart |
New Settings toggle tile for performance monitoring. |
lib/features/observability/presentation/observability_section.dart |
Adds the performance tile to the Observability settings section. |
lib/l10n/app_en.arb |
Adds English strings/metadata for performance monitoring toggle + snackbar. |
lib/l10n/app_fr.arb |
Adds French strings for performance monitoring toggle + snackbar. |
lib/l10n/app_de.arb |
Adds German strings for performance monitoring toggle + snackbar. |
lib/l10n/app_es.arb |
Adds Spanish strings for performance monitoring toggle + snackbar. |
test/features/observability/data/performance_preference_storage_test.dart |
New tests for performance preference storage read/write/default behavior. |
test/features/observability/data/crashlytics_preference_storage_test.dart |
Updates default/corruption expectations to match Crashlytics default-enabled behavior. |
test/features/observability/presentation/performance_toggle_tile_test.dart |
New widget tests for performance toggle UI + persistence. |
test/features/observability/presentation/crashlytics_toggle_tile_test.dart |
Updates widget test expectations for Crashlytics default-enabled behavior. |
test/features/observability/presentation/observability_section_test.dart |
Updates section test to include performance tile and divider count. |
SPEC.md |
Documents new performance dependency and updated defaults. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Isolate performance init in its own try/catch so a failure does not skip Crashlytics setup (copilot thread 1) - Fix crashlytics toggle fallback to match new default of true (thread 2) - Rename misleading test names to clarify they assert provided notifier state, not stored preference (threads 3 & 4) - Fix crashlytics toggle test that broke after default change Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
firebase_performancedependency and initialize at app startupTest plan
flutter test)dart analyze lib/shows no new issues🤖 Generated with Claude Code