Use the Monitoring Dashboard

Use the monitoring dashboard to identify and troubleshoot performance issues on your site. This article shows you how to monitor metrics, investigate problems, and optimize your site's performance.

Access the dashboard

Access the monitoring dashboard from either the code editor or your site's dashboard:

Identify performance issues

Start by reviewing the overview section to spot problems:

  1. Check the overview section at the top of the dashboard for exclamation icons indicating areas that need attention.

  2. Note the key metrics:

    • Failed backend requests
    • Failed data requests
    • Storage usage percentage
  3. Navigate to the appropriate breakdown tab based on what needs attention:

    • Backend Requests: For HTTP functions, web modules, or routers
    • Data Requests: For collection queries or data operations
    • Content Collection Storage: For storage quota concerns

Investigate backend problems

When you have issues with backend code:

  1. Navigate to the Backend Requests tab.

  2. Check the Failed Requests graph to identify the main failure type:

    • RPM throttling: Rate limit issues
    • Timeouts: Slow-running code
    • Errors: Code or system errors
  3. In the Top Backend Functions table, sort by the relevant metric:

    • Click Timed-Out to find functions timing out most frequently.
    • Click Errors to find functions with the most errors.
    • Click Total to find the most-called functions.
  4. Note the problematic function name.

  5. Apply a filter to view data for just that function:

    • Use the function dropdown filter at the top of the tab
    • All graphs and tables update to show only that function's data
  6. Review the Request Durations graph to understand typical performance for this function.

Optimize backend performance

Apply these solutions based on your findings:

For timeout issues:

  • Reduce the number of operations in your function.
  • Use caching to avoid repeated calculations.
  • Optimize database queries with proper filtering and sorting.

For RPM throttling:

  • Implement request batching.
  • Add delays between rapid requests.
  • Consider upgrading your premium plan for higher limits.

For errors:

  • Review error logs to identify the root cause.
  • Fix code bugs or handle edge cases.
  • Add proper error handling and validation.

Investigate data request problems

When you have issues with data operations:

  1. Navigate to the Data Requests tab.

  2. Check the Failed Requests graph to identify the main failure type.

  3. In the Top Data Requests table, sort by the relevant metric to find problematic queries.

  4. Note the collection name and operation type (query, insert, update, remove).

  5. Apply filters for the specific collection and operation:

    • Use the collection dropdown filter
    • Select the operation type if needed
  6. Review the Request Durations graph to understand query performance.

Optimize data performance

Apply these solutions:

  • Simplify complex queries.
  • Add proper indexes to collections.
  • Use efficient query patterns.
  • Implement caching for frequently accessed data.
  • Consider pagination for large result sets.

Troubleshoot storage issues

When storage usage is high:

  1. Navigate to the Content Collection Storage tab.

  2. Review the Collection Storage Breakdown table.

  3. Sort by storage size to identify the largest collections.

  4. Identify collections that are:

    • Unexpectedly large
    • Growing rapidly
    • No longer needed

Manage storage

Apply these strategies:

  • Remove unnecessary data from large collections.
  • Delete unused collections.
  • Review and clean up test data.

Example: Resolve timeout issues

This complete example shows how to investigate and fix timed-out backend requests:

The problem: The overview shows 622 failed backend requests over the past 30 days.

Investigation:

  1. Navigate to the Backend Requests tab and check the Failed Requests graph. Most failures are timeouts (turquoise line).

  2. In the Top Backend Functions table, click the Timed-Out column to sort in descending order. The getUserDetails function has the most timeouts.

  3. Select getUserDetails from the function filter dropdown to view data specific to this function.

  4. The Request Durations graph shows the median duration is high, confirming performance issues.

  5. The Failed Requests graph shows timeouts spike on specific days, suggesting the issue is triggered by certain conditions or traffic patterns.

  6. Open Google Cloud Logs and search for getUserDetails to find error messages and execution details.

The solution:

After reviewing the logs, you discover the function makes multiple sequential data queries. You refactor the code to:

  • Combine queries where possible
  • Add caching for frequently accessed data
  • Implement pagination for large result sets

Verification:

After publishing the changes, you check the dashboard daily for a week. The timeout count drops to near zero, confirming the fix worked.

See also

Did this help?