Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Firebase Performance Monitoring
plat_ios
plat_android
plat_web
plat_flutter
Thu thập thông tin chi tiết về các vấn đề về hiệu suất của ứng dụng.
Firebase Performance Monitoring là dịch vụ giúp bạn thu thập thông tin chi tiết về
đặc điểm hiệu suất của ứng dụng Apple, Android và ứng dụng web của bạn.
Bạn sử dụng SDK Performance Monitoring để thu thập dữ liệu hiệu suất từ ứng dụng của mình, sau đó
hãy xem lại và phân tích dữ liệu đó trong bảng điều khiển Firebase. Performance Monitoring sẽ giúp bạn
biết được đâu là điểm cần cải thiện
hiệu suất của ứng dụng theo thời gian thực.
mà bạn có thể sử dụng thông tin đó để khắc phục vấn đề về hiệu suất.
Bạn đã sẵn sàng bắt đầu? Chọn nền tảng bạn sử dụng:
iOS trở lên
Android
Web
Flutter
Các chức năng chính
Tự động đo lường thời gian khởi động ứng dụng, các yêu cầu về mạng HTTP và
các danh mục khác |
Khi tích hợp SDK Performance Monitoring vào ứng dụng, bạn không cần
viết bất kỳ mã nào trước khi ứng dụng của bạn bắt đầu tự động giám sát một số
khía cạnh quan trọng của hiệu suất.
Đối với các ứng dụng gốc, SDK ghi lại thời gian khởi động, hiển thị dữ liệu theo màn hình và
hoạt động khi chạy ở chế độ nền trước hoặc nền. Đối với ứng dụng web, nhật ký SDK
các khía cạnh như nội dung đầu tiên, khả năng người dùng tương tác
ứng dụng của bạn và nhiều nội dung khác. |
Thu thập thông tin chi tiết về các tình huống có thể khiến hiệu suất của ứng dụng bị ảnh hưởng
đã cải thiện |
Việc tối ưu hoá hiệu suất của ứng dụng có thể khó khăn nếu bạn không
biết chính xác lý do tại sao chiến dịch không đáp ứng được kỳ vọng của người dùng. Đó là lý do
Performance Monitoring cho phép bạn xem các chỉ số hiệu suất được phân tích theo
thuộc tính (như quốc gia)
thiết bị, phiên bản ứng dụng và cấp hệ điều hành. |
Tuỳ chỉnh tính năng giám sát đối với ứng dụng |
Bạn có thể đo lường
dấu vết mã tuỳ chỉnh
để ghi lại hiệu suất của ứng dụng trong các tình huống cụ thể, chẳng hạn như khi bạn
tải màn hình mới hoặc hiển thị tính năng tương tác mới. Và bạn có thể
tạo chỉ số tuỳ chỉnh trên các dấu vết mã tuỳ chỉnh này để tính số sự kiện
mà bạn xác định (như lượt truy cập bộ nhớ đệm) trong các dấu vết đó. |
Xác định những thay đổi quan trọng về hiệu suất của ứng dụng |
Xác định và giải quyết các vấn đề lớn về hiệu suất của ứng dụng, chẳng hạn như mạng
rất quan trọng đối với sự thành công của ứng dụng. Giám sát hiệu suất cho phép
bạn thiết lập và tuỳ chỉnh thông báo cho
các phần quan trọng nhất trong ứng dụng để bạn có thể xem và phản hồi
các cạm bẫy về hiệu suất – trước
chúng ảnh hưởng đến người dùng của bạn. |
Tính năng này hoạt động như thế nào?
Khi bạn thêm SDK Performance Monitoring, Firebase tự động bắt đầu thu thập
dữ liệu cho một số quy trình phổ biến trong ứng dụng của bạn, ví dụ:
Performance Monitoring sử dụng dấu vết để thu thập dữ liệu về các quá trình này. Một dấu vết là
một báo cáo chứa dữ liệu được thu thập giữa hai thời điểm trong ứng dụng của bạn.
Dữ liệu hiệu suất được thu thập cho mỗi dấu vết được gọi là chỉ số và sẽ khác nhau
tuỳ thuộc vào loại dấu vết. Ví dụ: khi một thực thể của ứng dụng của bạn gặp vấn đề
yêu cầu mạng, dấu vết sẽ thu thập các chỉ số quan trọng đối với mạng
giám sát yêu cầu, như thời gian phản hồi và kích thước tải trọng.
Mỗi khi một thực thể của ứng dụng chạy một quy trình được giám sát, dấu vết liên quan
cũng tự động thu thập dữ liệu thuộc tính cho phiên bản ứng dụng đó. Cho
Ví dụ: nếu một ứng dụng Android đưa ra yêu cầu mạng, dấu vết sẽ thu thập
thiết bị, phiên bản ứng dụng và các thuộc tính khác cho phiên bản ứng dụng cụ thể đó. Bạn
có thể sử dụng các thuộc tính này để lọc dữ liệu hiệu suất và tìm hiểu xem
phân khúc người dùng đang gặp vấn đề.
Các dấu vết có sẵn từ Performance Monitoring sẽ giúp bạn bắt đầu theo dõi
của ứng dụng, nhưng để tìm hiểu về hiệu suất của các tác vụ hoặc luồng cụ thể, hãy thử
đo lường dấu vết mã tuỳ chỉnh của riêng bạn
trong ứng dụng của bạn.
Lộ trình triển khai
|
Thêm SDK Performance Monitoring vào ứng dụng
|
Bạn có thể thêm SDK Performance Monitoring vào ứng dụng của mình, cùng với bất kỳ SDK nào khác
Sản phẩm của Firebase mà bạn muốn sử dụng trong ứng dụng của mình.
Nền tảng của Apple |
Android |
Web |
Phô biến
|
|
(Không bắt buộc)
Công cụ theo dõi mã tuỳ chỉnh và chỉ số tuỳ chỉnh trong ứng dụng của bạn
|
Bằng cách sử dụng SDK Performance Monitoring, bạn có thể đo lường
dấu vết mã tuỳ chỉnh và
chỉ số tuỳ chỉnh
để đo lường các khía cạnh cụ thể của hiệu suất ứng dụng.
|
|
Theo dõi dữ liệu hiệu suất trong bảng điều khiển theo thời gian thực
|
Trong
Bảng điều khiển Firebase,
bạn có thể theo dõi dữ liệu hiệu suất từ người dùng để tìm hiểu
trong những tình huống mà hiệu suất của ứng dụng có thể được cải thiện. Bạn cũng có thể
phân tích dữ liệu hiệu suất theo
thuộc tính, như phiên bản ứng dụng,
quốc gia, thiết bị hoặc hệ điều hành.
|
Dữ liệu người dùng
Performance Monitoring không lưu trữ vĩnh viễn bất kỳ thông tin nhận dạng cá nhân nào
(chẳng hạn như tên, địa chỉ email hoặc số điện thoại). Trong khi giám sát
Yêu cầu mạng HTTP, Performance Monitoring sử dụng URL (không bao gồm tham số URL)
để tạo các mẫu URL tổng hợp và ẩn danh mà cuối cùng sẽ được duy trì
và hiện trong bảng điều khiển Firebase.
Để biết thêm thông tin, hãy tham khảo
Ví dụ về thông tin được thu thập bởi
Performance Monitoring.
Các bước tiếp theo
Trừ phi có lưu ý khác, nội dung của trang này được cấp phép theo Giấy phép ghi nhận tác giả 4.0 của Creative Commons và các mẫu mã lập trình được cấp phép theo Giấy phép Apache 2.0. Để biết thông tin chi tiết, vui lòng tham khảo Chính sách trang web của Google Developers. Java là nhãn hiệu đã đăng ký của Oracle và/hoặc các đơn vị liên kết với Oracle.
Cập nhật lần gần đây nhất: 2025-07-24 UTC.
[null,null,["Cập nhật lần gần đây nhất: 2025-07-24 UTC."],[],[],null,["Firebase Performance Monitoring \nplat_ios plat_android plat_web plat_flutter \nGain insight into your app's performance issues. \nFirebase Performance Monitoring is a service that helps you to gain insight into the performance characteristics of your Apple, Android, and web apps.\n\n\u003cbr /\u003e\n\nYou use the Performance Monitoring SDK to collect performance data from your app, then\nreview and analyze that data in the Firebase console. Performance Monitoring helps you\nto understand in real time where the performance of your app can be improved so\nthat you can use that information to fix performance issues.\n\n\u003cbr /\u003e\n\nReady to get started? Choose your platform:\n\n[iOS+](/docs/perf-mon/get-started-ios)\n[Android](/docs/perf-mon/get-started-android)\n[Web](/docs/perf-mon/get-started-web)\n[Flutter](/docs/perf-mon/flutter/get-started)\n\nKey capabilities\n\n|-------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Automatically measure app startup time, HTTP network requests, and more | When you integrate the Performance Monitoring SDK into your app, you don't need to write any code before your app starts automatically monitoring several critical aspects of performance. For native apps, the SDK logs startup time, rendering data by screen, and activity while in the foreground or background. For web apps, the SDK logs aspects like first contentful paint, ability for users to interact with your app, and more. |\n| Gain insight into situations where app performance could be improved | Optimizing the performance of your app can be challenging when you don't know exactly why it is falling short of user expectations. That's why Performance Monitoring lets you see performance metrics broken down by [*attributes*](/docs/perf-mon/attributes), like country, device, app version, and OS level. |\n| Customize monitoring for your app | You can instrument [*custom code traces*](/docs/perf-mon/custom-code-traces) to capture your app's performance in specific situations, like when you load a new screen or display a new interactive feature. And, you can create *custom metrics* on these custom code traces to count events that you define (like cache hits) during those traces. |\n| Identify significant changes in app performance | Identifying and resolving major app performance issues, like network outages, is vital to the success of your app. Performance Monitoring lets you [set up and customize alerts](/docs/perf-mon/alerts) for the most critical parts of your app so you can see and respond to performance pitfalls -- before they affect your users. |\n\nHow does it work?\n\nWhen you add the Performance Monitoring SDK, Firebase *automatically* starts collecting\ndata for several common processes in your app, for example:\n\n|---|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------|\n| | - [App start up time for Apple and Android apps](/docs/perf-mon/app-start-foreground-background-traces) - [Screen rendering for Apple and Android apps](/docs/perf-mon/screen-traces) | - [Page loading for web apps](/docs/perf-mon/page-load-traces) - [Network requests for all types of apps](/docs/perf-mon/network-traces) |\n\nPerformance Monitoring uses ***traces*** to collect data about these processes. A trace is\na report that contains data captured between two points in time in your app.\n\nThe collected performance data for each trace are called ***metrics*** and vary\ndepending on the type of trace. For example, when an instance of your app issues\na network request, the trace collects metrics that are important for network\nrequest monitoring, like response time and payload size.\n\nEach time an instance of your app runs a monitored process, the associated trace\nalso automatically collects ***attributes*** data for that app instance. For\nexample, if an Android app issues a network request, the trace collects the\ndevice, app version, and other attributes for that specific app instance. You\ncan use these attributes to filter your performance data and learn if specific\nuser segments are experiencing issues.\n\nThe out-of-the-box traces from Performance Monitoring get you started with monitoring your\napp, but to learn about the performance of specific tasks or flows, try out\n[instrumenting your own custom traces of code](/docs/perf-mon/custom-code-traces)\nin your app.\n\nImplementation path\n\n|---|---------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| | Add the Performance Monitoring SDK to your app | You can add the Performance Monitoring SDK to your app, along with any other Firebase products that you want to use in your app. [Apple platforms](/docs/perf-mon/get-started-ios) \\| [Android](/docs/perf-mon/get-started-android) \\| [Web](/docs/perf-mon/get-started-web) \\| [Flutter](/docs/perf-mon/flutter/get-started) |\n| | *(Optional)* Instrument custom code traces and custom metrics in your app | Using the Performance Monitoring SDK, you can instrument [custom code traces and custom metrics](/docs/perf-mon/custom-code-traces) to measure specific aspects of your app's performance. |\n| | Monitor performance data in the console in real time | In the [Firebase console](//console.firebase.google.com/project/_/performance), you can monitor performance data from your users to learn the specific situations where your app's performance could be improved. You can also break down the performance data by [attributes](/docs/perf-mon/attributes), like app version, country, device, or OS. |\n\nUser data\n\nPerformance Monitoring does not permanently store any personally identifiable\ninformation (such as names, email addresses, or phone numbers). While monitoring\nHTTP network requests, Performance Monitoring uses URLs (not including URL parameters)\nto build aggregated and anonymous URL patterns that are eventually persisted\nand shown in the Firebase console.\n\nFor more details, refer to the\n[Examples of information collected by\nPerformance Monitoring](/support/privacy#performance-monitoring-collected-info).\n\nNext steps\n\n- To get started using Performance Monitoring in your app, visit:\n\n - [Get Started with Performance Monitoring for Apple platforms](/docs/perf-mon/get-started-ios)\n - [Get Started with Performance Monitoring for Android](/docs/perf-mon/get-started-android)\n - [Get Started with Performance Monitoring for web](/docs/perf-mon/get-started-web)\n - [Get Started with Performance Monitoring on Flutter](/docs/perf-mon/flutter/get-started)\n- To learn about setting up alerts, see [Set up alerts for performance issues](https://firebase.google.com/docs/perf-mon/alerts)."]]