Ta strona zawiera wskazówki dotyczące rozwiązywania problemów, które ułatwiają rozpoczęcie pracy z monitorowaniem wydajności lub korzystaniem z funkcji i narzędzi monitorowania wydajności.
Pierwsze kontrole pod kątem rozwiązywania problemów
Poniższe dwie kontrole są ogólnymi najlepszymi praktykami zalecanymi każdemu przed dalszym rozwiązywaniem problemów.
1. Sprawdź komunikaty dziennika pod kątem zdarzeń dotyczących wydajności
Sprawdź komunikaty dziennika, aby upewnić się, że zestaw SDK monitorowania wydajności przechwytuje zdarzenia dotyczące wydajności.
Otwórz narzędzia programistyczne przeglądarki (na przykład kartę Sieć w narzędziach dla programistów Chrome lub Monitor sieci w przeglądarce Firefox ).
Odśwież swoją aplikację internetową w przeglądarce.
Sprawdź komunikaty dziennika pod kątem komunikatów o błędach.
Po kilku sekundach poszukaj połączenia sieciowego z
firebaselogging.googleapis.com
w narzędziach programistycznych przeglądarki. Obecność tego połączenia sieciowego wskazuje, że przeglądarka wysyła dane o wydajności do Firebase.
Jeśli Twoja aplikacja nie rejestruje zdarzeń dotyczących wydajności, zapoznaj się ze wskazówkami dotyczącymi rozwiązywania problemów .
2. Sprawdź panel stanu Firebase
Sprawdź panel stanu Firebase na wypadek wiadomej awarii usługi Firebase lub Monitorowania wydajności.
Pierwsze kroki z monitorowaniem wydajności
Jeśli dopiero zaczynasz korzystać z monitorowania wydajności ( iOS+ | Android | Sieć ), poniższe wskazówki dotyczące rozwiązywania problemów mogą pomóc w rozwiązywaniu problemów związanych z wykrywaniem pakietu SDK przez Firebase lub wyświetlaniem pierwszych danych o wydajności w konsoli Firebase.
Firebase może wykryć, czy pomyślnie dodałeś pakiet SDK monitorowania wydajności do swojej aplikacji, gdy otrzyma z niej informacje o zdarzeniach (takich jak interakcje w aplikacji). Zwykle w ciągu 10 minut od uruchomienia aplikacji panel wydajności konsoli Firebase wyświetla komunikat „Wykryto pakiet SDK”. Następnie w ciągu 30 minut na desce rozdzielczej wyświetlane są wstępnie przetworzone dane.
Jeśli minęło ponad 10 minut od dodania najnowszej wersji zestawu SDK do aplikacji i nadal nie widzisz żadnych zmian, sprawdź komunikaty dziennika, aby upewnić się, że funkcja monitorowania wydajności rejestruje zdarzenia. Wypróbuj odpowiednie kroki rozwiązywania problemów opisane poniżej, aby rozwiązać problem z komunikatem o wykryciu opóźnionego pakietu SDK.
Jeśli nadal rozwijasz się lokalnie, spróbuj wygenerować więcej zdarzeń do zbierania danych:
Udostępniaj i wyświetlaj swoją aplikację internetową w środowisku lokalnym.
Generuj zdarzenia, ładując podstrony Twojej witryny, wchodząc w interakcję z Twoją aplikacją i/lub wywołując żądania sieciowe. Upewnij się, że karta przeglądarki jest otwarta przez co najmniej 10 sekund po załadowaniu strony.
Upewnij się, że obiekt konfiguracyjny Firebase został poprawnie dodany do Twojej aplikacji i że nie został zmodyfikowany. W szczególności sprawdź następujące elementy:
- Identyfikator aplikacji internetowej Firebase (
appId
) w obiekcie config jest poprawny dla Twojej aplikacji. Znajdź swój identyfikator aplikacji Firebase na karcie Twoje aplikacje w projektu .
Jeśli coś wydaje się nie tak z obiektem konfiguracyjnym w Twojej aplikacji, spróbuj wykonać następujące czynności:
Usuń obiekt konfiguracyjny, który aktualnie masz w swojej aplikacji.
Postępuj zgodnie z tymi instrukcjami, aby uzyskać nowy obiekt konfiguracyjny i dodać go do swojej aplikacji internetowej.
- Identyfikator aplikacji internetowej Firebase (
Jeśli SDK rejestruje zdarzenia i wydaje się, że wszystko jest poprawnie skonfigurowane, ale nadal nie widzisz komunikatu o wykryciu SDK ani przetworzonych danych (po 2 godzinach), skontaktuj się z pomocą techniczną Firebase .
Upewnij się, że pakiet SDK monitorowania wydajności jest poprawnie zainicjowany w Twojej aplikacji.
Upewnij się, że zestaw SDK monitorowania wydajności nie jest wyłączony za pomocą następującej flagi:
-
performance.instrumentationEnabled
-
Upewnij się, że buforowanie przeglądarki jest wyłączone, w przeciwnym razie przeglądarka może nie pobrać żadnych nowych ustawień instrumentacji.
Zamknij, a następnie ponownie otwórz kartę strony internetowej. Sprawdź ponownie logowanie.
Jeśli właśnie dodałeś zestaw SDK monitorowania wydajności do swojej aplikacji, może być konieczne całkowite ponowne uruchomienie aplikacji, aby zestaw SDK zaczął działać.
Jeśli nie możesz znaleźć niczego, co jest wyłączone w Twojej aplikacji, skontaktuj się z pomocą techniczną Firebase .
Performance Monitoring przetwarza dane o zdarzeniach dotyczących wydajności przed wyświetleniem ich w panelu Performance .
Jeśli od pojawienia się komunikatu „Wykryto pakiet SDK” minęły ponad 24 godziny i nadal nie widzisz danych, sprawdź Panel stanu Firebase na wypadek znanej awarii. Jeśli nie ma awarii, skontaktuj się z pomocą techniczną Firebase .
Ogólne rozwiązywanie problemów
Jeśli pomyślnie dodałeś zestaw SDK i używasz monitorowania wydajności w swojej aplikacji, poniższe wskazówki dotyczące rozwiązywania problemów mogą pomóc w ogólnych problemach związanych z funkcjami i narzędziami monitorowania wydajności.
Jeśli nie widzisz komunikatów dziennika zdarzeń dotyczących wydajności , wypróbuj następujące kroki rozwiązywania problemów:
Upewnij się, że pakiet SDK monitorowania wydajności jest poprawnie zainicjowany w Twojej aplikacji.
Upewnij się, że zestaw SDK monitorowania wydajności nie jest wyłączony za pomocą następującej flagi:
-
performance.instrumentationEnabled
-
Upewnij się, że buforowanie przeglądarki jest wyłączone, w przeciwnym razie przeglądarka może nie pobrać żadnych nowych ustawień instrumentacji.
Zamknij, a następnie ponownie otwórz kartę strony internetowej. Sprawdź ponownie logowanie.
Jeśli właśnie dodałeś zestaw SDK monitorowania wydajności do swojej aplikacji, może być konieczne całkowite ponowne uruchomienie aplikacji, aby zestaw SDK zaczął działać.
Jeśli nie możesz znaleźć niczego, co jest wyłączone w Twojej aplikacji, skontaktuj się z pomocą techniczną Firebase .
Jeśli nie widzisz danych dla pierwszego wskaźnika opóźnienia wejściowego , wypróbuj te rozwiązania:
Należy pamiętać, że monitorowanie wydajności rejestruje metrykę pierwszego opóźnienia wejściowego tylko wtedy, gdy użytkownik kliknie stronę internetową w ciągu pierwszych 5 sekund po załadowaniu strony.
Upewnij się, że masz skonfigurowaną aplikację do mierzenia tych danych. Pierwsza metryka opóźnienia wejścia wymaga ręcznej konfiguracji . W szczególności musisz dodać bibliotekę wypełniaczy dla tej metryki. Instrukcje dotyczące instalacji można znaleźć w dokumentacji biblioteki .
Należy zauważyć, że dodanie tej biblioteki wypełnienia nie jest wymagane, aby monitorowanie wydajności raportowało inne metryki aplikacji sieci Web.
Czy widzisz dane dotyczące wydajności dla automatycznie zbieranych śladów , ale nie dla śladów kodu niestandardowego ? Wypróbuj następujące kroki rozwiązywania problemów:
Sprawdź konfigurację niestandardowych śladów kodu oprzyrządowanych za pośrednictwem interfejsu Trace API , w szczególności następujące elementy:
- Nazwy dla niestandardowych śladów kodu i metryk niestandardowych muszą spełniać następujące wymagania: brak początkowego lub końcowego odstępu, brak wiodącego znaku podkreślenia (
_
), a maksymalna długość to 32 znaki. - Wszystkie ślady muszą być uruchamiane i zatrzymywane. Żadne śledzenie, które nie zostało uruchomione, nie zatrzymane lub zatrzymane przed uruchomieniem, nie zostanie zarejestrowane.
Zauważ, że jeśli używasz metody
record()
, nie musisz jawnie rozpoczynać ani zatrzymywać śledzenia.- Nazwy dla niestandardowych śladów kodu i metryk niestandardowych muszą spełniać następujące wymagania: brak początkowego lub końcowego odstępu, brak wiodącego znaku podkreślenia (
Upewnij się, że zbieranie danych monitorowania wydajności nie jest wyłączone za pomocą następującej flagi:
performance.dataCollectionEnabled
Ta flaga steruje zbieraniem danych tylko dla niestandardowych śladów kodu (nie wszystkich danych).
Sprawdź komunikaty dziennika, aby upewnić się, że funkcja monitorowania wydajności rejestruje oczekiwane niestandardowe ślady kodu.
Jeśli Monitorowanie wydajności rejestruje zdarzenia, ale po 24 godzinach nie wyświetlają się żadne dane, skontaktuj się z pomocą techniczną Firebase .
Jeśli brakuje danych żądania sieciowego, pamiętaj o następujących kwestiach:
Performance Monitoring automatycznie zbiera metryki dla żądań sieciowych zgłaszanych przez API przeglądarki. Raporty te nie obejmują nieudanych żądań sieciowych.
W zależności od zachowania kodu i bibliotek sieciowych używanych przez kod monitorowanie wydajności może zgłaszać tylko zakończone żądania sieciowe. Oznacza to, że pozostawione otwarte połączenia HTTP/S mogą nie być zgłaszane.
Dowiedz się więcej o tym, jak funkcja Performance Monitoring agreguje dane żądań sieciowych we wzorcach adresów URL.
Możesz też wypróbować niestandardowe wzorce adresów URL !
FAQ
Zastąpiliśmy Najczęstsze problemy najnowszymi alertami jako kontynuację naszego niedawnego wprowadzenia alertów, które automatycznie powiadamiają Cię o przekroczeniu ustawionych przez Ciebie progów. Problemy są teraz przestarzałe i zastąpione alertami.
Selektor aplikacji u góry karty Skuteczność filtruje wpisy alertów w obszarze Ostatnie alerty . Wyświetlane są tylko trzy najnowsze alerty dla wybranych aplikacji.
Aby dowiedzieć się więcej o alertach, zobacz Konfigurowanie alertów dotyczących problemów z wydajnością .
Monitorowanie wydajności obsługuje alerty dla metryk, które przekraczają zdefiniowane progi. Aby uniknąć pomyłek związanych z tymi konfigurowalnymi progami dla wskaźników wydajności, usunęliśmy możliwość konfigurowania progów dla problemów .
Zastąpiliśmy strony Szczegóły i Dane nowo zaprojektowanym, scentralizowanym interfejsem użytkownika (UI), aby usprawnić rozwiązywanie problemów. Ten nowy interfejs użytkownika do rozwiązywania problemów oferuje te same podstawowe funkcje, które oferowały szczegóły i dane. Aby dowiedzieć się więcej o rozwiązywaniu problemów, zobacz Wyświetlanie większej ilości danych dla określonego śledzenia .
Monitorowanie wydajności zbiera dane o wydajności z urządzeń użytkowników Twojej aplikacji. Jeśli aplikacja ma wielu użytkowników lub jeśli aplikacja generuje dużą ilość działań związanych z wydajnością, monitorowanie wydajności może ograniczyć zbieranie danych do podzbioru urządzeń, aby zmniejszyć liczbę przetworzonych zdarzeń. Te limity są na tyle wysokie, że nawet przy mniejszej liczbie zdarzeń wartości wskaźników są nadal reprezentatywne dla doświadczenia użytkownika w aplikacji.
Aby zarządzać ilością gromadzonych danych, Performance Monitoring używa następujących opcji próbkowania:
Ograniczanie szybkości na urządzeniu : aby zapobiec wysyłaniu przez urządzenie nagłych serii śladów, ograniczamy liczbę śladów kodu i żądań sieciowych wysyłanych z urządzenia do 300 zdarzeń co 10 minut. Takie podejście chroni urządzenie przed zapętlonymi oprzyrządowaniami, które mogą wysyłać duże ilości danych o wydajności, i zapobiega zniekształcaniu pomiarów wydajności przez pojedyncze urządzenie.
Próbkowanie dynamiczne : funkcja monitorowania wydajności zbiera około 100 mln zdarzeń dla śladów kodu i 100 mln dla śladów żądań sieciowych na aplikację dla wszystkich użytkowników aplikacji. Dynamiczna częstotliwość próbkowania jest pobierana z urządzeń (przy użyciu zdalnej konfiguracji Firebase), aby określić, czy losowe urządzenie powinno przechwytywać i wysyłać ślady. Urządzenie, które nie jest wybrane do próbkowania, nie wysyła żadnych zdarzeń. Dynamiczna częstotliwość próbkowania jest zależna od aplikacji i dostosowuje się, aby zapewnić, że całkowita ilość zebranych danych pozostanie poniżej limitu.
Sesje użytkownika wysyłają dodatkowe, szczegółowe dane z urządzenia użytkownika, co wymaga większej ilości zasobów do przechwytywania i wysyłania danych. Aby zminimalizować wpływ sesji użytkowników, monitorowanie wydajności może również ograniczyć liczbę sesji.
Ograniczanie szybkości po stronie serwera : aby upewnić się, że aplikacje nie przekraczają limitu próbkowania, monitorowanie wydajności może używać próbkowania po stronie serwera do porzucania niektórych zdarzeń odebranych z urządzeń. Chociaż ten rodzaj ograniczania nie zmienia skuteczności naszych danych, może powodować niewielkie zmiany wzorców, w tym:
- Liczba śladów może różnić się od liczby wykonań fragmentu kodu.
- Ślady, które są ściśle powiązane w kodzie, mogą mieć różną liczbę próbek.
Zastąpiliśmy kartę Problemy wprowadzeniem Alertów, które automatycznie powiadamiają Cię o przekroczeniu ustawionych przez Ciebie progów. Nie musisz już ręcznie sprawdzać konsoli Firebase, aby określić stan progu. Aby dowiedzieć się więcej o alertach, zobacz Konfigurowanie alertów dotyczących problemów z wydajnością .
Przeprojektowaliśmy sekcję Monitorowanie wydajności w konsoli Firebase, tak aby karta Pulpit nawigacyjny wyświetlała kluczowe dane i wszystkie ślady w jednym miejscu. W ramach przeprojektowania usunęliśmy strony Na urządzeniu i Sieć .
Tabela śladów na dole karty Pulpit nawigacyjny zawiera te same informacje, które wyświetlają karty Na urządzeniu i Sieć , ale z pewnymi dodatkowymi funkcjami, w tym możliwością sortowania śladów według procentowej zmiany dla określonej metryki. Aby wyświetlić wszystkie metryki i dane dla określonego śledzenia, kliknij nazwę śledzenia w tabeli śledzenia.
Wyświetl swoje ślady w następujących podkartach tabeli śladów:
- Ślady żądań sieciowych (zarówno gotowe, jak i niestandardowe) — podkarta Żądania sieciowe
- Niestandardowe ślady kodu — podzakładka Niestandardowe ślady
- Uruchamianie aplikacji, ślady aplikacji na pierwszym planie, ślady aplikacji w tle — podkarta Niestandardowe ślady
- Ślady renderowania ekranu — podzakładka renderowania ekranu
- Ślady ładowania strony — podkarta ładowania strony
Aby uzyskać szczegółowe informacje na temat tabeli śladów oraz wyświetlania metryk i danych, odwiedź stronę przeglądu konsoli ( iOS+ | Android | Sieć ).
Jeśli Performance Monitoring to jedyny produkt Firebase w Twojej aplikacji, możesz użyć samodzielnego pakietu SDK Performance Monitoring (i zalecanego poniżej skryptu nagłówka), jeśli interesuje Cię:
- przy użyciu biblioteki z przestrzenią nazw
- zmniejszenie rozmiaru pakietu SDK
- opóźnianie inicjalizacji SDK do czasu załadowania strony
Aby dołączyć do aplikacji samodzielny pakiet SDK do monitorowania wydajności i opóźnić jego inicjalizację do momentu załadowania strony:
- Add the following script to the header of your index file.
- Make sure to add your app's Firebase project configuration object .
(function(sa,fbc){function load(f,c){var a=document.createElement('script'); a.async=1;a.src=f;var s=document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(a,s);}load(sa); window.addEventListener('load',function(){firebase.initializeApp(fbc).performance()}); })(performance_standalone, firebaseConfig);
where,
- performance_standalone is
'https://www.gstatic.com/firebasejs/9.9.2/firebase-performance-standalone.js'
- firebaseConfig is your app's Firebase config object
The above script asynchronously loads the standalone SDK then initializes Firebase after the window's onload
event fires. This tactic reduces the impact that the SDK could have on page load metrics since the browser has already reported its loading metrics when you initialize the SDK.
Near real-time data processing and display
Firebase Performance Monitoring processes collected performance data as it comes in, which results in near real-time data display in the Firebase console. Processed data displays in the console within a few minutes of its collection, hence the term "near real-time".
To take advantage of near real-time data processing, make sure your app uses a real-time compatible SDK version .
To take advantage of near real-time data processing, you only need to make sure that your app uses a Performance Monitoring SDK version that's compatible with real-time data processing.
These are the real-time compatible SDK versions:
- iOS — v7.3.0 or later
- tvOS — v8.9.0 or later
- Android — v19.0.10 or later (or Firebase Android BoM v26.1.0 or later)
- Web — v7.14.0 or later
Note that we always recommend using the latest version of SDK, but any version listed above will enable Performance Monitoring to process your data in near real time.
These are the SDK versions compatible with real-time data processing:
- iOS — v7.3.0 or later
- tvOS — v8.9.0 or later
- Android — v19.0.10 or later (or Firebase Android BoM v26.1.0 or later)
- Web — v7.14.0 or later
Note that we always recommend using the latest version of SDK, but any version listed above will enable Performance Monitoring to process your data in near real time.
If your app doesn't use a real-time compatible SDK version, you will still see all your app's performance data in the Firebase console. However, the display of performance data will be delayed by roughly 36 hours from the time of its collection.
Yes! Regardless of which SDK version an app instance uses, you'll see performance data from all your users.
However, if you're looking at recent data (less than roughly 36 hours old), then the displayed data is from users of app instances using a real-time compatible SDK version. The non-recent data, though, includes performance data from all versions of your app.
Contacting Firebase Support
If you reach out to Firebase Support , always include your Firebase App ID. Find your Firebase App ID in the Your apps card of your Project settings .
,This page provides troubleshooting tips for getting started with Performance Monitoring or using Performance Monitoring features and tooling.
First checks for troubleshooting
The following two checks are general best practices recommended for anyone before further troubleshooting.
1. Check log messages for performance events
Check your log messages to be sure that the Performance Monitoring SDK is capturing performance events.
Open your browser's developer tools (for example, Network tab for Chrome Dev Tools or in the Network Monitor for Firefox ).
Refresh your web app in the browser.
Check your log messages for any error messages.
After a few seconds, look for a network call to
firebaselogging.googleapis.com
in your browser's developer tools. The presence of that network call shows that the browser is sending performance data to Firebase.
If your app isn't logging performance events, review the troubleshooting tips .
2. Check the Firebase Status Dashboard
Check the Firebase Status Dashboard in case there is a known outage for Firebase or for Performance Monitoring.
Getting started with Performance Monitoring
If you're getting started with Performance Monitoring ( iOS+ | Android | Web ), the following troubleshooting tips can help with issues that involve Firebase detecting the SDK or displaying your first performance data in the Firebase console.
Firebase can detect if you've successfully added the Performance Monitoring SDK to your app when it receives event information (like app interactions) from your app. Usually within 10 minutes of starting your app, the Performance dashboard of the Firebase console displays an "SDK detected" message. Then, within 30 minutes, the dashboard displays the initial processed data.
If it's been more than 10 minutes since you added the latest version of SDK to your app, and you're still not seeing any change, check your log messages to make sure that Performance Monitoring is logging events. Try the appropriate troubleshooting steps as described below to troubleshoot a delayed SDK detection message.
If you're still developing locally, try generating more events for data collection:
Serve and view your web app in a local environment.
Generate events by loading subpages for your site, interacting with your app, and/or triggering network requests. Make sure to keep the browser tab open for at least 10 seconds after the page loads.
Make sure that your Firebase configuration object is correctly added to your app and that you haven't modified the object. Specifically, check the following:
- The Firebase Web App ID (
appId
) in the config object is correct for your app. Find your Firebase App ID in the Your apps card of your Project settings .
If anything seems wrong with the config object in your app, try the following:
Delete the config object that you currently have in your app.
Follow these instructions to obtain a new config object and add it to your web app.
- The Firebase Web App ID (
If the SDK is logging events and everything seems to be set up correctly, but you're still not seeing the SDK detection message or processed data (after 2 hours), contact Firebase Support .
Make sure that the Performance Monitoring SDK is correctly initialized in your app.
Make sure that the Performance Monitoring SDK is not disabled through the following flag:
-
performance.instrumentationEnabled
-
Make sure that your browser caching is disabled, otherwise the browser might not pick up any new instrumentation settings.
Close, then reopen the webpage tab. Check for logging again.
If you just added the Performance Monitoring SDK in your app, you might need to fully restart your app for the SDK to start working.
If you can't find anything that's disabled in your app, contact Firebase Support .
Performance Monitoring processes performance event data before displaying it in the Performance dashboard .
If it's been more than 24 hours since the "SDK detected" message appeared , and you're still not seeing data, then check the Firebase Status Dashboard in case there is a known outage. If there is no outage, contact Firebase Support .
General troubleshooting
If you've successfully added the SDK and are using Performance Monitoring in your app, the following troubleshooting tips can help with general issues that involve Performance Monitoring features and tooling.
If you're not seeing log messages for performance events , try the following troubleshooting steps:
Make sure that the Performance Monitoring SDK is correctly initialized in your app.
Make sure that the Performance Monitoring SDK is not disabled through the following flag:
-
performance.instrumentationEnabled
-
Make sure that your browser caching is disabled, otherwise the browser might not pick up any new instrumentation settings.
Close, then reopen the webpage tab. Check for logging again.
If you just added the Performance Monitoring SDK in your app, you might need to fully restart your app for the SDK to start working.
If you can't find anything that's disabled in your app, contact Firebase Support .
If you're not seeing data for the first input delay metric , try the following troubleshooting steps:
Be aware that Performance Monitoring only records the first input delay metric when a user clicks on the web page within the first 5 seconds after page load.
Make sure that you've set up your app to measure this metric. The first input delay metric requires manual setup . Specifically, you need to add the polyfill library for this metric. For installation instructions, refer to the library's documentation .
Note that adding this polyfill library is not required for Performance Monitoring to report other web app metrics.
Are you seeing performance data for automatically collected traces but not for custom code traces ? Try the following troubleshooting steps:
Check the setup of custom code traces instrumented via the Trace API , especially the following:
- Names for custom code traces and custom metrics must meet the following requirements: no leading or trailing whitespace, no leading underscore (
_
) character, and max length is 32 characters. - All traces must be started and stopped. Any trace that is not started, not stopped, or stopped before started will not be logged.
Note that if you're using the
record()
method, then you don't need to explicitly start or stop your trace.- Names for custom code traces and custom metrics must meet the following requirements: no leading or trailing whitespace, no leading underscore (
Make sure that Performance Monitoring data collection is not disabled through the following flag:
performance.dataCollectionEnabled
This flag controls the collection of data for custom code traces only (not all data).
Check your log messages to make sure that Performance Monitoring is logging expected custom code traces.
If Performance Monitoring is logging events, but no data displays after 24 hours, contact Firebase Support .
If you're missing network request data, be aware of the following:
Performance Monitoring automatically collects metrics for network requests reported by the browser API. These reports do not include failed network requests.
Depending on the behavior of your code and networking libraries used by your code, Performance Monitoring might only report on network requests that are completed. This means that HTTP/S connections that are left open might not be reported.
Learn more about how Performance Monitoring aggregates network request data under URL patterns.
You can also try out custom URL patterns !
FAQ
We replaced Top Issues with Recent Alerts as a follow-up to our recent introduction of alerts, which automatically notify you when the thresholds you set are crossed. Issues are now deprecated and replaced by alerts.
The apps selector at the top of the Performance card filters the alert entries under Recent Alerts . Only the three most recent alerts for the app(s) selected are displayed.
To learn more about alerts, see Set up alerts for performance issues .
Performance Monitoring supports alerts for metrics that exceed defined thresholds. To avoid confusion with these configurable thresholds for performance metrics, we removed the ability to configure thresholds for issues .
We replaced the Details and Metrics pages with a newly redesigned, centralized user interface (UI) to improve how you troubleshoot issues. This new troubleshooting UI offers the same core functionality that Details and Metrics offered. To learn more about troubleshooting, see View more data for a specific trace .
Performance Monitoring collects performance data from your app's user devices. If your application has many users or if the app generates a large amount of performance activity, Performance Monitoring might limit data collection to a subset of devices to reduce the number of processed events. These limits are high enough so that, even with fewer events, the metric values are still representative of your user's app experience.
To manage the volume of data that we collect, Performance Monitoring uses the following sampling options:
On-device rate limiting : To prevent a device from sending sudden bursts of traces, we limit the number of code and network request traces sent from a device to 300 events every 10 mins. This approach protects the device from looped instrumentations that can send large amounts of performance data, and it prevents a single device from skewing the performance measurements.
Dynamic sampling : Performance Monitoring collects approximately 100M events for code traces and 100M for network request traces per app across all app users. A dynamic sampling rate is fetched on devices (using Firebase Remote Config) to determine whether a random device should capture and send traces. A device that is not selected for sampling does not send any events. The dynamic sampling rate is app-specific and adjusts to ensure that the overall volume of collected data remains below the limit.
User sessions send additional, detailed data from a user's device, requiring more resources to capture and send the data. To minimize the impact of user sessions, Performance Monitoring might also restrict the number of sessions.
Server-side rate limiting : To ensure that apps don't exceed the sampling limit, Performance Monitoring might use server-side sampling to drop some events received from devices. Although this type of limiting doesn't change the effectiveness of our metrics, it may cause minor pattern shifts, including the following:
- The number of traces can differ from the number of times that a piece of code was executed.
- Traces that are closely coupled in code may each have a different number of samples.
We replaced the Issues tab with the introduction of Alerts, which automatically notifies you when the thresholds you set are exceeded. You no longer need to manually check the Firebase console to determine the status of a threshold. To learn about Alerts, see Set up alerts for performance issues .
We've redesigned the Performance Monitoring section of the Firebase console so that the Dashboard tab displays your key metrics and all your traces in one space. As part of the redesign, we removed the On device and Network pages.
The traces table at the bottom of the Dashboard tab has all the same information that the On device and Network tabs displayed, but with some added features, including the ability to sort your traces by the percentage change for a specific metric. To view all the metrics and data for a specific trace, click the trace name in the traces table.
View your traces in the following subtabs of the traces table:
- Network request traces (both out-of-the-box and custom) — Network requests subtab
- Custom code traces — Custom traces subtab
- App start, app-in-foreground, app-in-background traces — Custom traces subtab
- Screen rendering traces — Screen rendering subtab
- Page load traces — Page load subtab
For details about the traces table and viewing metrics and data, visit the console overview page ( iOS+ | Android | Web ).
If Performance Monitoring is the only Firebase product in your app, you can use the standalone Performance Monitoring SDK (and the recommended header script below) if you're interested in:
- using a namespaced library
- reducing your SDK package size
- delaying initialization of the SDK until after your page loads
To include the standalone Performance Monitoring SDK in your app and delay its initialization to after your page loads:
- Add the following script to the header of your index file.
- Make sure to add your app's Firebase project configuration object .
(function(sa,fbc){function load(f,c){var a=document.createElement('script'); a.async=1;a.src=f;var s=document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(a,s);}load(sa); window.addEventListener('load',function(){firebase.initializeApp(fbc).performance()}); })(performance_standalone, firebaseConfig);
where,
- performance_standalone is
'https://www.gstatic.com/firebasejs/9.9.2/firebase-performance-standalone.js'
- firebaseConfig is your app's Firebase config object
The above script asynchronously loads the standalone SDK then initializes Firebase after the window's onload
event fires. This tactic reduces the impact that the SDK could have on page load metrics since the browser has already reported its loading metrics when you initialize the SDK.
Near real-time data processing and display
Firebase Performance Monitoring processes collected performance data as it comes in, which results in near real-time data display in the Firebase console. Processed data displays in the console within a few minutes of its collection, hence the term "near real-time".
To take advantage of near real-time data processing, make sure your app uses a real-time compatible SDK version .
To take advantage of near real-time data processing, you only need to make sure that your app uses a Performance Monitoring SDK version that's compatible with real-time data processing.
These are the real-time compatible SDK versions:
- iOS — v7.3.0 or later
- tvOS — v8.9.0 or later
- Android — v19.0.10 or later (or Firebase Android BoM v26.1.0 or later)
- Web — v7.14.0 or later
Note that we always recommend using the latest version of SDK, but any version listed above will enable Performance Monitoring to process your data in near real time.
These are the SDK versions compatible with real-time data processing:
- iOS — v7.3.0 or later
- tvOS — v8.9.0 or later
- Android — v19.0.10 or later (or Firebase Android BoM v26.1.0 or later)
- Web — v7.14.0 or later
Note that we always recommend using the latest version of SDK, but any version listed above will enable Performance Monitoring to process your data in near real time.
If your app doesn't use a real-time compatible SDK version, you will still see all your app's performance data in the Firebase console. However, the display of performance data will be delayed by roughly 36 hours from the time of its collection.
Yes! Regardless of which SDK version an app instance uses, you'll see performance data from all your users.
However, if you're looking at recent data (less than roughly 36 hours old), then the displayed data is from users of app instances using a real-time compatible SDK version. The non-recent data, though, includes performance data from all versions of your app.
Contacting Firebase Support
If you reach out to Firebase Support , always include your Firebase App ID. Find your Firebase App ID in the Your apps card of your Project settings .