---
title: Google Cloud Tasks
description: >-
  A managed service for managing the execution, dispatch, and delivery of a
  large number of distributed tasks.
breadcrumbs: Docs > Integrations > Google Cloud Tasks
---

# Google Cloud Tasks

## Overview{% #overview %}

Google Cloud Tasks is a fully managed service that allows you to manage the execution, dispatch, and delivery of a large number of distributed tasks.

Use the Datadog Google Cloud Platform integration to collect metrics from Google Cloud Tasks.

## Setup{% #setup %}

### Installation{% #installation %}

If you haven't already, set up the [Google Cloud Platform integration](https://docs.datadoghq.com/integrations/google-cloud-platform/) first. There are no other installation steps.

### Log collection{% #log-collection %}

Google Cloud Tasks logs are collected with Google Cloud Logging and sent to a Dataflow job through a Cloud Pub/Sub topic. If you haven't already, [set up logging with the Datadog Dataflow template](https://docs.datadoghq.com/integrations/google-cloud-platform/#log-collection).

Once this is done, export your Google Cloud Tasks logs from Google Cloud Logging to the Pub/Sub topic:

1. Go to the [Google Cloud Logging page](https://console.cloud.google.com/logs/viewer) and filter the Google Cloud Tasks logs.
1. Click **Create Export** and name the sink.
1. Choose "Cloud Pub/Sub" as the destination and select the Pub/Sub topic that was created for that purpose. **Note**: The Pub/Sub topic can be located in a different project.
1. Click **Create** and wait for the confirmation message to show up.

## Data Collected{% #data-collected %}

### Metrics{% #metrics %}

|  |
|  |
| **gcp.cloudtasks.api.request\_count**(count)                      | Count of Cloud Tasks API calls.*Shown as request*                                        |
| **gcp.cloudtasks.queue.depth**(gauge)                             | The number of tasks in the queue.                                                        |
| **gcp.cloudtasks.queue.task\_attempt\_count**(count)              | Count of task attempts broken down by response code.                                     |
| **gcp.cloudtasks.queue.task\_attempt\_delays.avg**(gauge)         | Delay between each scheduled attempt time and actual attempt time.*Shown as millisecond* |
| **gcp.cloudtasks.queue.task\_attempt\_delays.samplecount**(count) | Sample count for task attempt delays.*Shown as millisecond*                              |
| **gcp.cloudtasks.queue.task\_attempt\_delays.sumsqdev**(gauge)    | Sum of squared deviation for task attempt delays.*Shown as second*                       |

### Events{% #events %}

The Google Cloud Tasks integration does not include any events.

### Service Checks{% #service-checks %}

The Google Cloud Tasks integration does not include any service checks.

## Troubleshooting{% #troubleshooting %}

Need help? Contact [Datadog support](https://docs.datadoghq.com/help/).
