Get started with Performance Monitoring for Flutter Stay organized with collections Save and categorize content based on your preferences.
This quickstart describes how to set up Firebase Performance Monitoring to helpyou to gain insight into the performance characteristics of your Flutter apps.
Before you begin
If you haven't already,configure and initialize Firebase in your Flutterproject.
Step 1: Add Performance Monitoring to your app
From the root directory of your Flutter project, run the followingcommand to install the Performance Monitoring Flutter plugin:
flutterpubaddfirebase_performanceFrom the root directory of your Flutter project, run the following command:
flutterfireconfigureRunning this command ensures that your Flutter app's Firebase configurationis up-to-date and, for Android, adds the required Performance MonitoringGradle plugin to your app.
Once complete, rebuild your Flutter project:
flutterrun
After you've added the Performance Monitoring SDK, Firebase automatically starts collectingdata related to your app's lifecycle (likeapp start time), anddata forHTTP/S network requests.
On Flutter, automatic screen rendering performance monitoring is not possiblefor individual Flutter screens. A single view controller encapsulates yourentire Flutter application natively so the underlying native Firebase SDK isnot aware of screen transitions.
Note: When you add Performance Monitoring to your app, the Remote Config SDK isincluded as a dependency. If you already use Remote Config, you won't seeany difference. However, if you're new to Remote Config, explore theRemote Config documentation to learn moreabout the various features you'll be able to access in your app.Step 2: Generate performance events for initial data display
Firebase starts processing the events when you successfully add the SDK to yourapp. If you're still developing locally, interact with your app to generateevents for initial data collection and processing.
Note: The Performance Monitoring SDK batches events locally then sends them to Firebaseperiodically (every 30 seconds) or when the app comes back to foreground. So,there's a delay between an app interaction and when Firebase receives the eventinformation from your app.Continue to develop your app using a simulator or test device.
Generate events by switching your app between background and foregroundseveral times, interacting with your app by navigating across screens,and/or triggering network requests.
Go to thePerformance dashboardof the Firebase console. You should see your initial data display withina few minutes.
If you don't see a display of your initial data, review thetroubleshootingtips.
Step 3:(Optional) View log messages for performance events
Check your log messages for any error messages.
Performance Monitoring tags its log messages with the following tags so thatyou can filter your log messages:
- iOS+:
Firebase/Performance - Android:
FirebasePerformance
- iOS+:
Check for the following types of logs which indicate that Performance Monitoring islogging performance events:
Logging trace metric:TRACE_NAME,FIREBASE_PERFORMANCE_CONSOLE_URLLogging network request trace:URL
Click on the URL to view your data in the Firebase console. It may take a fewmoments for the data to update in the dashboard.
Step 4:(Optional) Add custom monitoring for specific code
To monitor performance data associated with specific code in your app, you caninstrumentcustom code traces.
With a custom code trace, you can measure how long it takes your app to completea specific task or set of tasks, such as loading a set of images or queryingyour database. The default metric for a custom code trace is its duration, butyou can also add custom metrics, such as cache hits and memory warnings.
In your code, you define the beginning and the end of a custom code trace (andadd any desired custom metrics) using the API provided by the Performance Monitoring SDK.
VisitAdd monitoring for specific codeto learn more about these features and how to add them to your app.
Step 5: Deploy your app then review results
After you've validated Performance Monitoring using the an emulator and one or moretest devices, you can deploy the updated version of your app to your users.
You can monitor performance data in thePerformance dashboardof the Firebase console.
Next steps
Learn more about data automatically collected by Performance Monitoring:
- Data related to your app's lifecycle, likeapp start time
- Data forHTTP/S network requests issuedby your app
View, track, and filter yourperformance data in the Firebase console.
Add monitoring for specific tasks or workflows in your app byinstrumenting custom code traces.
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2026-02-04 UTC.