Skip to content

Commit 4534813

Browse files
nhulstoncswatt
andauthored
Cloud Run Functions v2 Docs Refresh (#31440)
* move files from `in_process` to `in_container` * add aliases * Rename other references to in-process * (chore): create functions directory * (chore): generalize container-languages -> serverless-init-languages for reuse (GCP functions, Azure) * (feat): create separate pages for each runtime * Add banner redirecting to 1st gen functions * fix container languages call * revert container-languages rename * add FUNCTION_TARGET env var to table if in function docs * implement python page * implement node page * implement go page * implement java page * disable php in container-languages if in functions * remove duplicated service label * implement dotnet page * implement ruby page * fix ruby DD_SOURCE * copy edits and image fixing * also update sidecar container docs --------- Co-authored-by: cecilia saixue watt <[email protected]>
1 parent 21737b7 commit 4534813

File tree

20 files changed

+645
-803
lines changed

20 files changed

+645
-803
lines changed

content/en/serverless/google_cloud_run/containers/in_container/_index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@ First, set up the **[Google Cloud Integration][1]** to collect metrics and logs
1010

1111
Then, instrument your application using one of the following guides:
1212

13-
{{% container-languages path="in_container" %}}
13+
{{% container-languages path="google_cloud_run/containers/in_container" %}}
1414

1515
[1]: /integrations/google-cloud-platform/

content/en/serverless/google_cloud_run/containers/sidecar/_index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ First, set up the [Datadog-Google Cloud Platform integration][1] to collect metr
99

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

12-
{{% container-languages path="sidecar" %}}
12+
{{% container-languages path="google_cloud_run/containers/sidecar" %}}
1313

1414
[1]: /integrations/google-cloud-platform/

content/en/serverless/google_cloud_run/containers/sidecar/dotnet.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,9 @@ RUN mkdir -p /dd_tracer/dotnet/ && tar -xzvf /tmp/datadog-dotnet-apm.tar.gz -C /
6161

6262
3. **Set up logs**.
6363

64-
In the previous step, you created a shared volume. Additionally, you set the `DD_SERVERLESS_LOG_PATH` env var, or it was defaulted to `/shared-volume/logs/app.log`.
64+
In the previous step, you created a shared volume. You may have also set the `DD_SERVERLESS_LOG_PATH` environment variable, which defaults to `/shared-volume/logs/app.log`.
6565

66-
Now, you will need to configure your logging library to write logs to that file. In .NET, we recommend writing logs in a JSON format. For example, you can use a third-party logging library such as `Serilog`:
66+
In this step, configure your logging library to write logs to that file set in `DD_SERVERLESS_LOG_PATH`. In .NET, we recommend writing logs in a JSON format. For example, you can use a third-party logging library such as `Serilog`:
6767
{{< code-block lang="csharp" disable_copy="false" >}}
6868
using Serilog;
6969

content/en/serverless/google_cloud_run/containers/sidecar/go.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,9 @@ go get github.com/DataDog/dd-trace-go/contrib/net/http/v2
6161

6262
3. **Set up logs**.
6363

64-
In the previous step, you created a shared volume. Additionally, you set the `DD_SERVERLESS_LOG_PATH` env var, or it was defaulted to `/shared-volume/logs/app.log`.
64+
In the previous step, you created a shared volume. You may have also set the `DD_SERVERLESS_LOG_PATH` environment variable, which defaults to `/shared-volume/logs/app.log`.
6565

66-
Now, you will need to configure your logging library to write logs to that file. In Go, we recommend writing logs in a JSON format. For example, you can use a third-party logging library such as `logrus`:
66+
In this step, configure your logging library to write logs to the file set in `DD_SERVERLESS_LOG_PATH`. In Go, we recommend writing logs in a JSON format. For example, you can use a third-party logging library such as `logrus`:
6767
{{< code-block lang="go" disable_copy="false" >}}
6868
const LOG_FILE = "/shared-volume/logs/app.log"
6969

content/en/serverless/google_cloud_run/containers/sidecar/java.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,9 @@ implementation 'com.datadoghq:dd-trace-api:DD_TRACE_JAVA_VERSION_HERE'
7070

7171
3. **Set up logs**.
7272

73-
In the previous step, you created a shared volume. Additionally, you set the `DD_SERVERLESS_LOG_PATH` env var, or it was defaulted to `/shared-volume/logs/app.log`.
73+
In the previous step, you created a shared volume. You may have also set the `DD_SERVERLESS_LOG_PATH` environment variable, which defaults to `/shared-volume/logs/app.log`.
7474

75-
Now, you will need to configure your logging library to write logs to that file. In Java, we recommend writing logs in a JSON format. For example, you can use a third-party logging library such as `Log4j 2`:
75+
In this step, configure your logging library to write logs to the file set in `DD_SERVERLESS_LOG_PATH`. In Java, we recommend writing logs in a JSON format. For example, you can use a third-party logging library such as `Log4j 2`:
7676

7777
{{< code-block lang="java" disable_copy="false" >}}
7878
private static final Logger logger = LogManager.getLogger(App.class);

content/en/serverless/google_cloud_run/containers/sidecar/nodejs.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,9 @@ ENV NODE_OPTIONS="--require dd-trace/init"
5858

5959
3. **Set up logs**.
6060

61-
In the previous step, you created a shared volume. Additionally, you set the `DD_SERVERLESS_LOG_PATH` env var, or it was defaulted to `/shared-volume/logs/app.log`.
61+
In the previous step, you created a shared volume. You may have also set the `DD_SERVERLESS_LOG_PATH` environment variable, which defaults to `/shared-volume/logs/app.log`.
6262

63-
Now, you will need to configure your logging library to write logs to that file. In Node.js, we recommend writing logs in a JSON format. For example, you can use a third-party logging library such as `winston`:
63+
In this step, configure your logging library to write logs to the file set in `DD_SERVERLESS_LOG_PATH`. In Node.js, we recommend writing logs in a JSON format. For example, you can use a third-party logging library such as `winston`:
6464
{{< code-block lang="javascript" disable_copy="false" >}}
6565
const tracer = require('dd-trace').init({
6666
logInjection: true,

content/en/serverless/google_cloud_run/containers/sidecar/php.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,9 @@ apk add libgcc
5353

5454
3. **Set up logs**.
5555

56-
In the previous step, you created a shared volume. Additionally, you set the `DD_SERVERLESS_LOG_PATH` env var, or it was defaulted to `/shared-volume/logs/app.log`.
56+
In the previous step, you created a shared volume. You may have also set the `DD_SERVERLESS_LOG_PATH` environment variable, which defaults to `/shared-volume/logs/app.log`.
5757

58-
Now, you will need to configure your logging library to write logs to that file. For example:
58+
In this step, configure your logging library to write logs to the file set in `DD_SERVERLESS_LOG_PATH`. For example:
5959

6060
{{< code-block lang="php" disable_copy="false" >}}
6161
const LOG_FILE = "/shared-volume/logs/app.log";

content/en/serverless/google_cloud_run/containers/sidecar/python.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,9 @@ RUN pip install ddtrace
5050

5151
3. **Set up logs**.
5252

53-
In the previous step, you created a shared volume. Additionally, you set the `DD_SERVERLESS_LOG_PATH` env var, or it was defaulted to `/shared-volume/logs/app.log`.
53+
In the previous step, you created a shared volume. You may have also set the `DD_SERVERLESS_LOG_PATH` environment variable, which defaults to `/shared-volume/logs/app.log`.
5454

55-
Now, you will need to configure your logging library to write logs to that file. You can also set a custom format for log/trace correlation and other features. Datadog recommends setting the following environment variables:
55+
In this step, configure your logging library to write logs to the file set in `DD_SERVERLESS_LOG_PATH`. You can also set a custom format for log/trace correlation and other features. Datadog recommends setting the following environment variables:
5656
- `ENV PYTHONUNBUFFERED=1`: In your main container. Ensure Python outputs appear immediately in container logs instead of being buffered.
5757
- `ENV DD_LOGS_INJECTION=true`: In your main container. Enable log/trace correlation for supported loggers.
5858
- `DD_SOURCE=python`: In your sidecar container. Enable advanced Datadog log parsing.

content/en/serverless/google_cloud_run/containers/sidecar/ruby.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ gem 'datadog'
4646

4747
3. **Set up logs**.
4848

49-
In the previous step, you created a shared volume. Additionally, you set the `DD_SERVERLESS_LOG_PATH` env var, or it was defaulted to `/shared-volume/logs/app.log`.
49+
In the previous step, you created a shared volume. Additionally, you may have also set the `DD_SERVERLESS_LOG_PATH` environment variable, which defaults to `/shared-volume/logs/app.log`.
5050

51-
Now, you will need to configure your logging library to write logs to that file. You can also set a custom format for log/trace correlation and other features. Datadog recommends setting the environment variable `DD_SOURCE=go` in your sidecar container to enable advanced Datadog log parsing.
51+
In this step, configure your logging library to write logs to the file set in `DD_SERVERLESS_LOG_PATH`. You can also set a custom format for log/trace correlation and other features. Datadog recommends setting the environment variable `DD_SOURCE=ruby` in your sidecar container to enable advanced Datadog log parsing.
5252

5353
Then, update your logging library. For example, you can use Ruby's native `logger` library:
5454
{{< code-block lang="ruby" disable_copy="false" >}}

0 commit comments

Comments
 (0)