[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["没有我需要的信息","missingTheInformationINeed","thumb-down"],["太复杂/步骤太多","tooComplicatedTooManySteps","thumb-down"],["内容需要更新","outOfDate","thumb-down"],["翻译问题","translationIssue","thumb-down"],["示例/代码问题","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-09-05。"],[],[],null,["\u003cbr /\u003e\n\nThere are a few different ways to monitor your Firebase Realtime Database's\nperformance and spot potential problems in your app. Looking at your app's\nincoming and outgoing bandwidth and load can also give you an idea of what\nto expect on your bill. Additionally, if something seems off, getting a clear\npicture of your database's operations can be a helpful troubleshooting tool.\n\nThis page discusses Realtime Database performance monitoring. For usage\nmonitoring, see [Monitor Database Usage](/docs/database/usage/monitor-usage).\n\nUse Realtime Database monitoring tools\n\nYou can gather data about your Realtime Database's performance through a few\ndifferent tools, depending on the level of granularity you need.\n\nUse the Realtime Database profiler tool\n\nThe [Realtime Database profiler tool](/docs/database/usage/profile) provides a realtime overview of\nread/write operations on your database. The report includes information about\nthe speed and payload size of each operation, in addition to unindexed queries.\nIt doesn't include historical information or any statistics about connection\noverhead, however, and **should not be used to estimate billing costs**.\n\nTo learn more about using the profiler tool, see\n[Profile your database](/docs/database/usage/profile).\n\nUse the Firebase console\n\nThe **Usage** tab in the\n[Firebase console](//console.firebase.google.com/project/_/database/usage/current-billing/bandwidth)\noffers information about simultaneous connections to your database, how much\ndata you're storing, outgoing bandwidth (including protocol and encryption\noverhead), and your database's load over 1-minute intervals. While the **Usage**\ntab gives you a more accurate overview of your database's overall performance,\nyou might not be able to drill down enough to troubleshoot potential performance issues.\n\nUse Cloud Monitoring\n\nWith Cloud Monitoring from Google Cloud, you can use the Metrics\nExplorer to see individual performance metrics, or create different dashboards\nwith charts that display various combinations of performance metrics over time.\nThe Realtime Database integration with Cloud Monitoring offers the deepest\nlevel of granularity.\n\nThe steps for setting up Cloud Monitoring are described in [Monitor Database Usage](/docs/database/usage/monitor-usage#stackdriver-setup).\n\nSee the following sections for tips on using specific Cloud Monitoring\nmetrics to spot performance issues.\n\nMonitor performance in Cloud Monitoring\n\nIf you're experiencing issues with performance, including uptime or latency, you\nmight want to use Cloud Monitoring to monitor the following metrics.\nNote all metric type names are prefixed with `firebasedatabase.googleapis.com/`.\n\n| Metric Name | Description |\n|-------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Database Load | `io/database_load`. Use this metric to monitor how much of your available database bandwidth is in use processing requests over time. You might see performance issues as your database load approaches the total available bandwidth. You can also see which operation types are utilizing the most load, and troubleshoot accordingly. Reported load might exceed 100% on operations that take longer than a minute. This happens when the total bandwidth used across multiple minutes is condensed into the minute-long reporting interval after the operation has completed. |\n| Network Disabled for Overages | `network/disabled_for_overages`. This metric reflects any outages that might have occurred if your Realtime Database exceeded any bandwidth or network limits. |\n| Storage Disabled for Overages | `storage/disabled_for_overages`. This metric reflects any outages that might have occurred if your Realtime Database exceeded any storage limits. |\n\nCombine metrics in charts on your dashboard for helpful insights and overviews.\nFor example, try the following combinations:\n\n- **Operations:** Use the `io/database_load` metric to see how much of your total database load is used by each operation type. Make sure to group `io/database_load` by type to troubleshoot different operation types.\n- **Storage:** Use the `storage/limit` and `storage/total_bytes` to monitor your storage utilization in relation to the Realtime Database storage limits. You can also add `storage/disabled_for_overages` to see if your app experienced any down time as a result of exceeded storage limits.\n- **SSL overhead:** Use `network/https_requests_count` to monitor how many SSL connection requests your database received, and split out requests that reused an existing SSL session ticket with the `reused_ssl_session` filter. You can measure this against the `network/sent_bytes_count` and `network/sent_payload_and_protocol_bytes_count` to monitor whether or not your app is using SSL session tickets efficiently.\n\nYou can also set up [alerts](/docs/database/usage/monitor-usage#stackdriver-alert-setup) through\nCloud Monitoring and receive notifications based on Realtime Database metrics.\nFor example, you can choose to receive a notification if your `io/database_load`\nis approaching a certain threshold.\n\nSee the [full list of Realtime Database metrics available through Cloud Monitoring](//cloud.google.com/monitoring/api/metrics_gcp_d_h#gcp-firebasedatabase).\n\nDatabase Load Types\n\nThe `io/database_load` metric also provides a label of which operation type\ncaused the load. The following are the possible types of operations measured:\n\n- `admin`: Admin operations like setting rules and reading project metadata.\n- `auth`: Verifying authentication from service accounts or Firebase Authentication for a single client.\n- `client_management`: Handling the addition and removal of concurrent connections this includes running disconnect operations on removal.\n- `get_shallow`: Retrieving the data from a REST GET with `shallow=true`.\n- `get`: Handling REST GET operations.\n- `listen`: Retrieving the initial data for `on` and `once` operations from connected clients.\n- `on_disconnect`: Registering on disconnect operations from clients.\n- `put`: Handling `set` operations from clients or REST PUT operations.\n- `transaction`: Performing transactions from conditional REST requests or a `transaction` operation from a client.\n- `update`: Handling `update` operations or REST PATCH requests.\n\nMonitor Security Rules in Cloud Monitoring\n\nYou can also analyze evaluation of Security Rules. Note all metric type names\nare prefixed with `firebasedatabase.googleapis.com/`.\n\n| Metric Name | Description |\n|------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Rule evaluations | `rules/evaluation_count`. The number of Realtime Database Rules evaluations performed in response to write or read requests. You can break this metric down by the result of the request (ALLOW, DENY, or ERROR). |\n\nTailor your Cloud Monitoring chart for Rules evaluations as needed, for\nexample by filtering on particular evaluation results, ALLOW, DENY, or ERROR.\nSetting up and customizing charts is covered in\n[Monitor Database Usage](/docs/database/usage/monitor-usage#stackdriver-add-chart).\n\nSee the [full list of Realtime Database metrics available through Cloud Monitoring](//cloud.google.com/monitoring/api/metrics_gcp_d_h#gcp-firebasedatabase)."]]