Instrument Google Cloud Run Applications With the New Datadog Agent Sidecar | Datadog

Instrument Google Cloud Run applications with the new Datadog Agent sidecar

Author Jordan Obey
Author Brandon A Smith
Author Anu Paul

Published: 2月 24, 2025

Google Cloud Run is a fully managed service that allows you to deploy, manage, and scale workloads on serverless containers. Because Cloud Run abstracts away infrastructure management and runs on complex, distributed backends, it can be difficult to troubleshoot. Datadog’s integrations with Google Cloud and Google Cloud Run address that challenge by collecting and visualizing key metrics and logs. And you can gain even further visibility into Cloud Run workloads by instrumenting your application with the Datadog Agent sidecar. Typically, instrumentation requires multiple steps and code changes, which can take focus away from the critical work of core application development. The sidecar enables you to instrument your application and set up Datadog monitoring directly from the Cloud Run UI, removing the need to reduce your code directly.

When applications are instrumented, the Datadog Agent sidecar container will run alongside your Cloud Run functions as it collects critical monitoring data such as request traces, logs, and custom metrics—all viewable within Datadog Serverless Monitoring.

In this post, we’ll look at how you can easily set up the sidecar and how it provides real-time insights into the health and performance of your serverless containerized workloads.

Set up the sidecar directly in Google Cloud

As shown in the diagram below, when you’ve set up the sidecar, it will run alongside your main application container and forward custom metrics, traces, and logs to Datadog. This approach simplifies integration, reduces setup and configuration time, and avoids the risks (such as faulty configurations and code-breaking changes) that are associated with manual instrumentation.

Diagram that shows how the sidecar container forwards metrics, logs, and traces to Datadog.

To set up the sidecar from the Cloud Run UI, select a service to instrument and choose “Edit & Deploy New Revision” at the top of your service’s page, then add a container with the image URL gcr.io/datadoghq/serverless-init:latest. You can also set up and manage instrumentation by using YAML and Terraform.

Collect and visualize Cloud Run custom metrics, traces, and logs

After your application is instrumented, you can visualize your Cloud Run telemetry with the Datadog Serverless view as part of a seamless integration. This will allow you to investigate request traces, logs, and custom metrics to understand how your serverless containerized workloads are performing, troubleshoot issues, and identify bottlenecks—all within a single view. For example, if you see that a Cloud Run service is marked as having a high error rate or is experiencing cold starts, selecting that service will pivot you directly to associated traces and logs to help you uncover potential root causes.

Side panel that shows traces and logs for a service.

In addition to traces and logs, the sidecar enables you to collect and visualize custom metrics so that you can monitor KPIs specific to your business. This means that you can track the success rate of user transactions and the number of orders processed per minute in an e-commerce app and visualize them on a dashboard alongside telemetry from the rest of your stack.

Quickly instrument your Google Cloud Run services today

The new Datadog Agent sidecar makes it easier for you to get deep, actionable insights into your Cloud Run workloads. After setup, the sidecar will collect Cloud Run telemetry data and send it directly to Datadog, providing you with a seamless, centralized monitoring experience.

If you aren’t already using Datadog, sign up today for a 14-day .