From 2005c508d34cd2944b774bd1776110921ddb44a3 Mon Sep 17 00:00:00 2001 From: cecilia saixue watt Date: Fri, 10 Jan 2025 10:56:47 -0800 Subject: [PATCH] more updates --- .../en/serverless/google_cloud_run/_index.md | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/content/en/serverless/google_cloud_run/_index.md b/content/en/serverless/google_cloud_run/_index.md index 96ad81d23fef1..8e177e0790ad7 100644 --- a/content/en/serverless/google_cloud_run/_index.md +++ b/content/en/serverless/google_cloud_run/_index.md @@ -30,7 +30,7 @@ Set `ENV NODE_OPTIONS="--require dd-trace/init"`. This specifies that the `dd-tr The tracing library also collects custom metrics. See the [code examples][2]. #### Logs -The Datadog sidecar collects logs through a shared volume. To forward logs from your main container to the sidecar, configure your application to write all logs to a location such as `shared-volume/logs/*.log`. Ensure that you set the environment variable `DD_SERVERLESS_LOG_PATH` to this location on both the main application container and sidecar container. +The Datadog sidecar collects logs through a shared volume. To forward logs from your main container to the sidecar, configure your application to write all logs to a location such as `shared-volume/logs/*.log` using the steps below. You must follow the setup in the GCP UI to add the environment variable `DD_SERVERLESS_LOG_PATH` and a shared Volume Mount to both the main and sidecar container. If you decide to deploy using YAML or Terraform, the environment variables, health check, and volume mount are already added. To set up logging in your application, see [Node.js Log Collection][3]. To set up trace log correlation, see [Correlating Node.js Logs and Traces][4]. @@ -49,7 +49,7 @@ In your main application, add the `dd-trace-py` library. See [Tracing Python App The tracing library also collects custom metrics. See the [code examples][2]. #### Logs -The Datadog sidecar collects logs through a shared volume. To forward logs from your main container to the sidecar, configure your application to write all logs to a location such as `shared-volume/logs/*.log`. Ensure that you set the environment variable `DD_SERVERLESS_LOG_PATH` to this location on both the main application container and sidecar container. +The Datadog sidecar collects logs through a shared volume. To forward logs from your main container to the sidecar, configure your application to write all logs to a location such as `shared-volume/logs/*.log` using the steps below. You must follow the setup in the GCP UI to add the environment variable `DD_SERVERLESS_LOG_PATH` and a shared Volume Mount to both the main and sidecar container. If you decide to deploy using YAML or Terraform, the environment variables, health check, and volume mount are already added. To set up logging in your application, see [Python Log Collection][3]. [Python Logging Best Practices][6] can also be helpful. To set up trace log correlation, see [Correlating Python Logs and Traces][4]. @@ -87,7 +87,7 @@ ENTRYPOINT [ "java", "-javaagent:dd-java-agent.jar", "-jar", "cloudrun-java-1.ja To collect custom metrics, [install the Java DogStatsD client][2]. #### Logs -The Datadog sidecar collects logs through a shared volume. To forward logs from your main container to the sidecar, configure your application to write all logs to a location such as `shared-volume/logs/*.log`. Ensure that you set the environment variable `DD_SERVERLESS_LOG_PATH` to this location on both the main application container and sidecar container. +The Datadog sidecar collects logs through a shared volume. To forward logs from your main container to the sidecar, configure your application to write all logs to a location such as `shared-volume/logs/*.log` using the steps below. You must follow the setup in the GCP UI to add the environment variable `DD_SERVERLESS_LOG_PATH` and a shared Volume Mount to both the main and sidecar container. If you decide to deploy using YAML or Terraform, the environment variables, health check, and volume mount are already added. To set up logging in your application, see [Java Log Collection][3]. To set up trace log correlation, see [Correlating Java Logs and Traces][4]. @@ -106,7 +106,7 @@ In your main application, add the `dd-trace-go` library. See [Tracing Go Applica The tracing library also collects custom metrics. See the [code examples][2]. #### Logs -The Datadog sidecar collects logs through a shared volume. To forward logs from your main container to the sidecar, configure your application to write all logs to a location such as `shared-volume/logs/*.log`. Ensure that you set the environment variable `DD_SERVERLESS_LOG_PATH` to this location on both the main application container and sidecar container. +The Datadog sidecar collects logs through a shared volume. To forward logs from your main container to the sidecar, configure your application to write all logs to a location such as `shared-volume/logs/*.log` using the steps below. You must follow the setup in the GCP UI to add the environment variable `DD_SERVERLESS_LOG_PATH` and a shared Volume Mount to both the main and sidecar container. If you decide to deploy using YAML or Terraform, the environment variables, health check, and volume mount are already added. To set up logging in your application, see [Go Log Collection][3]. To set up trace log correlation, see [Correlating Go Logs and Traces][4]. @@ -145,7 +145,7 @@ ENTRYPOINT ["dotnet", "dotnet.dll"] The tracing library also collects custom metrics. See the [code examples][2]. #### Logs -The Datadog sidecar collects logs through a shared volume. To forward logs from your main container to the sidecar, configure your application to write all logs to a location such as `shared-volume/logs/*.log`. Ensure that you set the environment variable `DD_SERVERLESS_LOG_PATH` to this location on both the main application container and sidecar container. +The Datadog sidecar collects logs through a shared volume. To forward logs from your main container to the sidecar, configure your application to write all logs to a location such as `shared-volume/logs/*.log` using the steps below. You must follow the setup in the GCP UI to add the environment variable `DD_SERVERLESS_LOG_PATH` and a shared Volume Mount to both the main and sidecar container. If you decide to deploy using YAML or Terraform, the environment variables, health check, and volume mount are already added. To set up logging in your application, see [C# Log Collection][3]. To set up trace log correlation, see [Correlating .NET Logs and Traces][4]. @@ -161,7 +161,7 @@ In your main application, add the `dd-trace-php` library. See [Tracing PHP Appli The tracing library also collects custom metrics. See the [code examples][2]. #### Logs -The Datadog sidecar collects logs through a shared volume. To forward logs from your main container to the sidecar, configure your application to write all logs to a location such as `shared-volume/logs/*.log`. Ensure that you set the environment variable `DD_SERVERLESS_LOG_PATH` to this location on both the main application container and sidecar container. +The Datadog sidecar collects logs through a shared volume. To forward logs from your main container to the sidecar, configure your application to write all logs to a location such as `shared-volume/logs/*.log` using the steps below. You must follow the setup in the GCP UI to add the environment variable `DD_SERVERLESS_LOG_PATH` and a shared Volume Mount to both the main and sidecar container. If you decide to deploy using YAML or Terraform, the environment variables, health check, and volume mount are already added. To set up logging in your application, see [PHP Log Collection][3]. To set up trace log correlation, see [Correlating PHP Logs and Traces][4]. @@ -539,14 +539,15 @@ Supply placeholder values: | -------- | ----------- | |`DD_API_KEY`| [Datadog API key][4] - **Required**| | `DD_SITE` | [Datadog site][5] - **Required** | -| `DD_LOGS_ENABLED` | When true, send logs (stdout and stderr) to Datadog. Defaults to false. | | `DD_LOGS_INJECTION`| When true, enrich all logs with trace data for supported loggers in [Java][6], [Node][7], [.NET][8], and [PHP][9]. See additional docs for [Python][10], [Go][11], and [Ruby][12]. | | `DD_TRACE_SAMPLE_RATE`| Controls the trace ingestion sample rate `0.0` and `1.0`. | | `DD_SERVICE` | See [Unified Service Tagging][13]. | | `DD_VERSION` | See [Unified Service Tagging][13]. | | `DD_ENV` | See [Unified Service Tagging][13]. | | `DD_SOURCE` | See [Unified Service Tagging][13]. | -| `DD_TAGS` | See [Unified Service Tagging][13]. +| `DD_TAGS` | See [Unified Service Tagging][13]. | + +Do not use the `DD_LOGS_ENABLED` environment variable. This variable is only used for the [serverless-init][14] install method. ## Example application @@ -877,3 +878,4 @@ $statsd->increment('page.views', 1, array('environment'=>'dev')); [11]: /tracing/other_telemetry/connect_logs_and_traces/go [12]: /tracing/other_telemetry/connect_logs_and_traces/ruby [13]: /getting_started/tagging/unified_service_tagging/ +[14]: /serverless/guide/gcr_serverless_init \ No newline at end of file