Skip to content

feat(observability): add Firebase Performance Monitoring with opt-in toggle#35

Merged
using-system merged 10 commits intomainfrom
feat/firebase-performance-monitoring
Apr 25, 2026
Merged

feat(observability): add Firebase Performance Monitoring with opt-in toggle#35
using-system merged 10 commits intomainfrom
feat/firebase-performance-monitoring

Conversation

@using-system
Copy link
Copy Markdown
Owner

Summary

  • Add firebase_performance dependency and initialize at app startup
  • Add a new Performance monitoring toggle in Settings > Observability (below Crash reporting)
  • Change Crash reporting default from opt-in to enabled by default
  • Performance monitoring is also enabled by default
  • Add l10n keys for all 4 locales (en, fr, de, es)
  • Update SPEC.md with new dependency

Test plan

  • Verify 330 tests pass (flutter test)
  • Verify dart analyze lib/ shows no new issues
  • Open Settings and confirm Performance monitoring toggle appears below Crash reporting
  • Toggle performance monitoring off/on and verify it persists across app restart
  • Verify crash reporting toggle now defaults to on for fresh install

🤖 Generated with Claude Code

Copilot AI review requested due to automatic review settings April 25, 2026 10:10
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

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_performance dependency and wire up collection enabling at app startup.
  • Introduce Performance monitoring preference storage/provider + a new PerformanceToggleTile in 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.

Comment thread lib/main.dart Outdated
Comment thread lib/features/observability/data/crashlytics_preference_storage.dart
Comment thread test/features/observability/presentation/performance_toggle_tile_test.dart Outdated
Comment thread test/features/observability/presentation/crashlytics_toggle_tile_test.dart Outdated
- 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>
@using-system using-system merged commit 071c4d4 into main Apr 25, 2026
3 checks passed
@using-system using-system deleted the feat/firebase-performance-monitoring branch April 25, 2026 10:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants