---
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
---

> For the complete documentation index, see [llms.txt](https://docs.datadoghq.com/llms.txt).

# Google Cloud Tasks

{% callout %}
# Important note for users on the following Datadog sites: us2.ddog-gov.com

{% alert level="info" %}
To find out if this integration is available in your organization, see your [Datadog Integrations](https://app.datadoghq.com/integrations) page or ask your organization administrator.

To initiate an exception request to enable this integration for your organization, email [support@ddog-gov.com](mailto:support@ddog-gov.com).
{% /alert %}

{% /callout %}

## Overview{% #overview %}

[Google Cloud Tasks](https://docs.cloud.google.com/tasks/docs) is a fully managed service that allows you to manage the execution, dispatch, and delivery of many 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.md) 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.md#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)                      | Number of Cloud Tasks API calls.*Shown as request*                                       |
| **gcp.cloudtasks.queue.depth**(gauge)                             | Number of tasks in the queue.*Shown as task*                                             |
| **gcp.cloudtasks.queue.task_attempt_count**(count)              | Number of task attempts, broken down by response code.*Shown as attempt*                 |
| **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) | Number of task attempts sampled for the delay between scheduled and actual attempt time. |
| **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/).
