จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
Firebase Performance Monitoring
plat_ios
plat_android
plat_web
plat_flutter
รับข้อมูลเชิงลึกเกี่ยวกับปัญหาด้านประสิทธิภาพของแอป
Firebase Performance Monitoring เป็นบริการที่ช่วยให้คุณทราบข้อมูลเชิงลึกเกี่ยวกับ
ลักษณะด้านประสิทธิภาพของ Apple, Android และเว็บแอปของคุณ
คุณใช้ Performance Monitoring SDK เพื่อรวบรวมข้อมูลประสิทธิภาพจากแอป จากนั้น
ตรวจสอบและวิเคราะห์ข้อมูลนั้นในคอนโซล Firebase Performance Monitoring ช่วยคุณ
เพื่อทำความเข้าใจแบบเรียลไทม์ว่าจะปรับปรุงประสิทธิภาพ
ของแอปใดได้บ้างเพื่อ
คุณสามารถใช้ข้อมูลดังกล่าวเพื่อแก้ไขปัญหาด้านประสิทธิภาพได้
หากพร้อมที่จะเริ่มแล้ว เลือกแพลตฟอร์ม:
iOS
แอนดรอยด์
เว็บ
Flutter
ความสามารถที่สำคัญ
วัดเวลาเริ่มต้นของแอป คำขอเครือข่าย HTTP และ
อื่นๆ อีกมากมาย |
เมื่อผสานรวม Performance Monitoring SDK เข้ากับแอปแล้ว คุณไม่จำเป็นต้อง
เขียนโค้ดก่อนที่แอปของคุณจะเริ่มตรวจสอบ
แง่มุมสำคัญของประสิทธิภาพ
สำหรับแอปที่มาพร้อมเครื่อง SDK จะบันทึกเวลาเริ่มต้น การแสดงผลข้อมูลตามหน้าจอ และ
กิจกรรมเมื่ออยู่เบื้องหน้าหรือเบื้องหลัง สำหรับเว็บแอป บันทึก SDK
แง่มุมต่างๆ เช่น First Contentful Paint ความสามารถในการโต้ตอบกับผู้ใช้
แอปของคุณ และอื่นๆ |
รับข้อมูลเชิงลึกเกี่ยวกับสถานการณ์ต่างๆ ที่ประสิทธิภาพของแอปสามารถทำได้
ปรับปรุงแล้ว |
การเพิ่มประสิทธิภาพการทำงานของแอปเป็นเรื่องยากหากคุณไม่
เพราะอะไรทำให้วิดีโอไม่เป็นไปตามความคาดหวังของผู้ใช้ นั่นเป็นเหตุผล
Performance Monitoring ช่วยให้คุณเห็นเมตริกประสิทธิภาพแยกตาม
แอตทริบิวต์ เช่น ประเทศ
อุปกรณ์ เวอร์ชันแอป และระดับระบบปฏิบัติการ |
ปรับแต่งการตรวจสอบสำหรับแอปของคุณ |
คุณเล่นดนตรีได้
การติดตามโค้ดที่กำหนดเอง
เพื่อบันทึกประสิทธิภาพของแอปในสถานการณ์เฉพาะ เช่น
โหลดหน้าจอใหม่ หรือแสดงฟีเจอร์อินเทอร์แอกทีฟใหม่ และคุณยังสามารถ
สร้างเมตริกที่กำหนดเองในการติดตามโค้ดที่กำหนดเองเหล่านี้เพื่อนับเหตุการณ์
ที่คุณกำหนด (เช่น การพบแคช) ในระหว่างการติดตามเหล่านั้น |
ระบุการเปลี่ยนแปลงที่สําคัญในประสิทธิภาพของแอป |
ระบุและแก้ไขปัญหาหลักด้านประสิทธิภาพของแอป เช่น เครือข่าย
การหยุดทำงาน มีความสำคัญอย่างยิ่งต่อความสำเร็จของแอป การตรวจสอบประสิทธิภาพช่วยให้
คุณตั้งค่าและปรับแต่งการแจ้งเตือนสำหรับ
ส่วนที่สำคัญที่สุดของแอปเพื่อให้คุณสามารถดูและตอบสนองกับ
ข้อผิดพลาดด้านประสิทธิภาพ - ก่อนหน้านี้
ที่ส่งผลต่อผู้ใช้ |
วิธีการทำงาน
เมื่อคุณเพิ่ม Performance Monitoring SDK แล้ว Firebase จะเริ่มรวบรวมโดยอัตโนมัติ
ข้อมูลสำหรับกระบวนการทั่วไปหลายอย่างในแอปของคุณ เช่น
Performance Monitoring ใช้การติดตามในการรวบรวมข้อมูลเกี่ยวกับกระบวนการเหล่านี้ การติดตามคือ
รายงานที่มีข้อมูลที่บันทึกระหว่างเวลา 2 จุดในแอปของคุณ
ข้อมูลประสิทธิภาพที่รวบรวมไว้สำหรับแต่ละการติดตามจะเรียกว่าเมตริก และจะแตกต่างกันไป
โดยขึ้นอยู่กับประเภทของการติดตาม ตัวอย่างเช่น เมื่ออินสแตนซ์ของแอปเกิดปัญหา
คำขอเครือข่าย การติดตามจะรวบรวมเมตริกที่สำคัญสำหรับเครือข่าย
ขอการตรวจสอบ เช่น เวลาในการตอบสนองและขนาดเพย์โหลด
ทุกครั้งที่อินสแตนซ์ของแอปเรียกใช้กระบวนการที่ได้รับการตรวจสอบ การติดตามที่เกี่ยวข้อง
ยังรวบรวมข้อมูลแอตทริบิวต์สำหรับอินสแตนซ์ของแอปนั้นโดยอัตโนมัติด้วย สำหรับ
เช่น หากแอป Android ออกคำขอเครือข่าย การติดตามจะรวบรวม
อุปกรณ์ เวอร์ชันแอป และแอตทริบิวต์อื่นๆ สำหรับอินสแตนซ์แอปที่เจาะจงนั้น คุณ
สามารถใช้แอตทริบิวต์เหล่านี้เพื่อกรองข้อมูลประสิทธิภาพและดูว่า
กลุ่มผู้ใช้กำลังประสบปัญหา
การติดตามที่พร้อมใช้งานทันทีจาก Performance Monitoring ช่วยให้คุณเริ่มต้นตรวจสอบ
แต่หากต้องการทราบถึงประสิทธิภาพของงานหรือขั้นตอนต่างๆ ที่เฉพาะเจาะจง ให้ลอง
การใช้การติดตามโค้ดที่กำหนดเอง
ในแอปของคุณ
เส้นทางการใช้งาน
|
เพิ่ม SDK Performance Monitoring ลงในแอป
|
คุณเพิ่ม Performance Monitoring SDK ลงในแอปพร้อมกับ SDK อื่นๆ ได้
ผลิตภัณฑ์ Firebase ที่คุณต้องการใช้ในแอป
แพลตฟอร์มของ Apple |
Android |
เว็บ |
Flutter
|
|
(ไม่บังคับ)
ใช้การติดตามโค้ดที่กำหนดเองและเมตริกที่กำหนดเองในแอปของคุณ
|
เมื่อใช้ Performance Monitoring SDK จะทำให้คุณสามารถ
การติดตามโค้ดที่กำหนดเองและ
เมตริกที่กำหนดเอง
เพื่อวัดแง่มุมที่เจาะจงของประสิทธิภาพแอปของคุณ
|
|
ตรวจสอบข้อมูลประสิทธิภาพในคอนโซลแบบเรียลไทม์
|
ใน
คอนโซล Firebase,
คุณสามารถตรวจสอบข้อมูลประสิทธิภาพจากผู้ใช้
เพื่อเรียนรู้เกี่ยวกับ
สถานการณ์ที่สามารถปรับปรุงประสิทธิภาพของแอปได้ นอกจากนี้คุณยัง
ให้แจกแจงข้อมูลประสิทธิภาพตาม
แอตทริบิวต์ เช่น เวอร์ชันแอป
ประเทศ อุปกรณ์ หรือระบบปฏิบัติการ
|
ข้อมูลผู้ใช้
Performance Monitoring ไม่ได้จัดเก็บข้อมูลส่วนบุคคลที่ระบุตัวบุคคลนั้นได้ไว้อย่างถาวร
ข้อมูล (เช่น ชื่อ อีเมล หรือหมายเลขโทรศัพท์) ขณะตรวจสอบ
คำขอเครือข่าย HTTP Performance Monitoring ใช้ URL (ไม่รวมพารามิเตอร์ของ URL)
เพื่อสร้างรูปแบบ URL แบบรวมและไม่ระบุตัวตนที่คงอยู่อย่างถาวร
และแสดงในคอนโซล Firebase
ดูรายละเอียดเพิ่มเติมได้ที่
ตัวอย่างข้อมูลที่เก็บรวบรวมโดย
Performance Monitoring
ขั้นตอนถัดไป
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-24 UTC
[null,null,["อัปเดตล่าสุด 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)."]]