---
title: Instrumenting Cloud Run Functions
description: Datadog, the leading service for cloud-scale monitoring.
breadcrumbs: Docs > Serverless > Google Cloud Run > Instrumenting Cloud Run Functions
---

# Instrumenting Cloud Run Functions

{% alert level="info" %}
**Looking for 1st gen Cloud Run functions?** If you're using Cloud Run functions (1st gen), previously known as Cloud Functions (1st gen), see [Instrumenting 1st Gen Cloud Run Functions](https://docs.datadoghq.com/serverless/google_cloud_run/functions_1st_gen.md).
{% /alert %}

First, set up the [Datadog-Google Cloud Platform integration](https://docs.datadoghq.com/integrations/google-cloud-platform.md) to collect metrics and logs from Google Cloud services. Remember to add the `cloud asset viewer` role to your service account and enable the Cloud Asset Inventory API in Google Cloud.

Then, select your runtime below for instructions on how to instrument your application:

- [Python](https://docs.datadoghq.com/serverless/google_cloud_run/functions/python/)
- [Node.js](https://docs.datadoghq.com/serverless/google_cloud_run/functions/nodejs/)
- [go](https://docs.datadoghq.com/serverless/google_cloud_run/functions/go/)
- [Java](https://docs.datadoghq.com/serverless/google_cloud_run/functions/java/)
- [.NET](https://docs.datadoghq.com/serverless/google_cloud_run/functions/dotnet/)
- [Ruby](https://docs.datadoghq.com/serverless/google_cloud_run/functions/ruby/)

## Use the Datadog MCP server{% #use-the-datadog-mcp-server %}

Use the Datadog MCP server's [`serverless_onboarding`](https://docs.datadoghq.com/bits_ai/mcp_server/tools.md#serverless_onboarding) tool to set up monitoring for your Cloud Run functions with AI assistance. After you connect, try a prompt like:

```shell
Help me monitor my GCP Cloud Run functions with Datadog using Terraform.
```

## Further reading{% #further-reading %}

- [Cloud Functions is now Cloud Run functions — event-driven programming in one unified serverless platform](https://cloud.google.com/blog/products/serverless/google-cloud-functions-is-now-cloud-run-functions)
- [Datadog MCP Server: serverless_onboarding tool](https://docs.datadoghq.com/bits_ai/mcp_server/tools.md#serverless_onboarding)
