Skip to content

GCP Cloud Tasks

Collect GCP Cloud Tasks metrics.

Configuration

Install Func

We recommend enabling TrueWatch Integration - Extensions - Managed Func. All prerequisites are installed automatically; continue with the script installation.

If you deploy Func yourself, see Self-deploying Func.

Install Script

  1. Log in to the Func console, click [Script Market], open the TrueWatch Script Market, and search for integration_gcp_tasks.
  2. Click [Install], then enter the required parameters: account file name, Target Principal, and account name.
  3. Click [Deploy Startup Script]. The system automatically creates a Startup script set and configures the corresponding startup script.
  4. After enabling it, find the automatic trigger configuration under "Management / Automatic Trigger Configuration". Click [Execute] to run it immediately, then review the task record and logs.

Verification

  1. Under "Management / Automatic Trigger Configuration", confirm that the task exists and check its task records and logs for errors.
  2. In TrueWatch, check "Infrastructure / Custom" for the corresponding asset information.
  3. In TrueWatch, check "Metrics" for the corresponding measurement and monitoring data.

Metrics

GCP Cloud Tasks metrics are stored in the gcp_tasks measurement. The original metrics come from the Cloud Monitoring cloudtasks.googleapis.com/ namespace. The table below lists key metrics; see GCP Cloud Tasks metrics for the complete metric catalog.

Metric Original Metric Description Unit
api_request_count api/request_count Api request count Count
queue_depth queue/depth Queue depth Count
queue_task_attempt_count queue/task_attempt_count Queue task attempt count Count
queue_task_attempt_delays queue/task_attempt_delays Queue task attempt delays ms

Common metric labels include api_method and response_code. Use them to analyze queue behavior by API method and task result.