Monitoring Health and Performance

Stackdriver Monitoring provides Cloud Run performance monitoring, metrics, and uptime checks, along with alerts to send notifications when certain metric thresholds are exceeded. Note that Stackdriver pricing applies, which means there is no charge for metrics on the fully managed version of Cloud Run.

Cloud Run and Cloud Run on GKE are automatically integrated with Stackdriver Monitoring with no setup or configuration required. This means that metrics of your Cloud Run or Cloud Run on GKE services are captured automatically when they are running.

You can view metrics either in Stackdriver Monitoring or in the Cloud Run page in the console. Stackdriver Monitoring provides more charting and filtering options.

Resource names

The resource names you use differ for Cloud Run and Cloud Run on GKE:

  • For Cloud Run the monitoring resource name is Cloud Run Revision.

  • For Cloud Run on GKE the monitoring resource names are Kubernetes Container .

Viewing metrics in Cloud Run

To view metrics in Cloud Run:

  1. Go to Cloud Run

  2. Locate the service in the services list, and click on it.

  3. Click the Metrics tab to show the metrics for that revision.

Viewing metrics in Stackdriver Monitoring

To access metrics for your project in Stackdriver Monitoring:

  1. If you haven't done so already, add your project to a Stackdriver Monitoring workspace.

  2. Visit the Stackdriver Monitoring Metrics Explorer page in your project:

    Stackdriver Monitoring

  3. If you are using Cloud Run, locate the Find resource type and metric, textbox and enter Cloud Run Revision, then select one of the metrics in the dropdown list. You can find a full description of each metric in the Monitoring metrics page for Cloud Run.

  4. If you are using Cloud Run on GKE, locate the Find resource type and metric, textbox and enter Kubernetes Container, then select one of the metrics in the dropdown list:

    Kubernetes Container metrics Description
    CPU limit utilization The fraction of the CPU limit that is currently in use on the instance. This value cannot exceed 1 as usage cannot exceed the limit.
    CPU request utilization The fraction of the requested CPU that is currently in use on the instance. This value can be greater than 1 as usage can exceed the request.
    CPU usage time Cumulative CPU usage on all cores used by the container in seconds.
    Server request count Number of requests received by the service.
    Server response latencies Distribution of service response latency for incoming requests.

    You can use the following filters and groupings:

    • Group by revision
    • Group by revision and latency
    • Filter by knative service, then group by service revision

Adding Uptime checks

You can use Stackdriver Monitoring to keep track of your services' performance. For more information, see Verify availability of your service (uptime checks).

Adding Alerts

You can use Stackdriver Monitoring to send notification about certain events, such as uptime check failures. For more information, see Create and manage alerting policies for your service.

Оцените, насколько информация на этой странице была вам полезна:

Оставить отзыв о...

Текущей странице
Cloud Run Documentation