From 9479d82650e6947062a663e97a7f728a3fa60663 Mon Sep 17 00:00:00 2001 From: Max Phillips Date: Fri, 31 Jul 2026 15:51:06 -0500 Subject: [PATCH 1/6] add bunyan and pino instructions --- content/en/logs/log_collection/nodejs.md | 110 +++++++++++++++++++---- 1 file changed, 93 insertions(+), 17 deletions(-) diff --git a/content/en/logs/log_collection/nodejs.md b/content/en/logs/log_collection/nodejs.md index ea24e43b3f2..7213bbf9c33 100644 --- a/content/en/logs/log_collection/nodejs.md +++ b/content/en/logs/log_collection/nodejs.md @@ -26,15 +26,22 @@ further_reading: ## Configure your logger -To send your logs to Datadog, log to a file and [tail][14] that file with your Datadog Agent. Use the [Winston][1] logging library to log from your Node.js application. +To send your logs to Datadog, log to a file and [tail][14] that file with your Datadog Agent. Use a Node.js logging library, such as [Winston][1], [Bunyan][15], or [Pino][16], to log from your Node.js application. -Winston is available through [NPM][2], to get started, you want to add the dependency to your code: +### Log to a file + +In your bootstrap file or in your code, declare the logger in the following way: + +{{< tabs >}} +{{% tab "Winston 3.0" %}} + +Winston is available through [NPM][2]. Add the dependency to your code: ```text npm install --save winston ``` -`package.json` is updated with the corresponding dependencies: +`package.json` is updated with the corresponding dependency: ```js { @@ -49,13 +56,6 @@ npm install --save winston } ``` -### Log to a file - -In your bootstrap file or in your code, declare the logger in the following way: - -{{< tabs >}} -{{% tab "Winston 3.0" %}} - ```js const { createLogger, format, transports } = require('winston'); @@ -76,9 +76,22 @@ logger.log('info', 'Hello simple log!'); logger.info('Hello log with metas',{color: 'blue' }); ``` +Check the content of the `.log` file to confirm that Winston is logging in JSON: + +```json +{"level":"info","message":"Hello simple log!","timestamp":"2015-04-23T16:52:05.337Z"} +{"color":"blue","level":"info","message":"Hello log with metas","timestamp":"2015-04-23T16:52:05.339Z"} +``` + {{% /tab %}} {{% tab "Winston 2.0" %}} +Winston is available through [NPM][2]. Add the dependency to your code: + +```text +npm install --save winston +``` + ```js var winston = require('winston'); @@ -98,9 +111,6 @@ logger.log('info', 'Hello simple log!'); logger.info('Hello log with metas',{color: 'blue' }); ``` -{{% /tab %}} -{{< /tabs >}} - Check the content of the `.log` file to confirm that Winston is logging in JSON: ```json @@ -108,9 +118,72 @@ Check the content of the `.log` file to confirm that Winston is loggi {"color":"blue","level":"info","message":"Hello log with metas","timestamp":"2015-04-23T16:52:05.339Z"} ``` +{{% /tab %}} +{{% tab "Bunyan" %}} + +Bunyan is available through [NPM][2]. Add the dependency to your code: + +```text +npm install --save bunyan +``` + +```js +const bunyan = require('bunyan'); + +const logger = bunyan.createLogger({ + name: '', + streams: [ + { + level: 'info', + path: `${appRoot}/logs/.log`, + }, + ], +}); + +// Example logs +logger.info('Hello simple log!'); +logger.info({ color: 'blue' }, 'Hello log with metas'); +``` + +Bunyan logs in JSON by default. Check the content of the `.log` file to confirm: + +```json +{"name":"","hostname":"my-host","pid":1234,"level":30,"msg":"Hello simple log!","time":"2015-04-23T16:52:05.337Z","v":0} +{"name":"","hostname":"my-host","pid":1234,"level":30,"color":"blue","msg":"Hello log with metas","time":"2015-04-23T16:52:05.339Z","v":0} +``` + +{{% /tab %}} +{{% tab "Pino" %}} + +Pino is available through [NPM][2]. Add the dependency to your code: + +```text +npm install --save pino +``` + +```js +const pino = require('pino'); + +const logger = pino(pino.destination(`${appRoot}/logs/.log`)); + +// Example logs +logger.info('Hello simple log!'); +logger.info({ color: 'blue' }, 'Hello log with metas'); +``` + +Pino logs in JSON by default. Check the content of the `.log` file to confirm: + +```json +{"level":30,"time":1429807925337,"pid":1234,"hostname":"my-host","msg":"Hello simple log!"} +{"level":30,"time":1429807925339,"pid":1234,"hostname":"my-host","color":"blue","msg":"Hello log with metas"} +``` + +{{% /tab %}} +{{< /tabs >}} + ## Configure your Datadog Agent -Once [log collection is enabled][6], set up [custom log collection][7] to tail your log files and send new logs to Datadog. +After [log collection is enabled][6], set up [custom log collection][7] to tail your log files and send new logs to Datadog. 1. Create a `nodejs.d/` folder in the `conf.d/` [Agent configuration directory][8]. 2. Create a `conf.yaml` file in `nodejs.d/` with the following content: @@ -137,16 +210,16 @@ If logs are in JSON format, Datadog automatically [parses the log messages][11] ## Connect your service across logs and traces -If APM is enabled for this application, connect your logs and traces by automatically adding trace IDs, span IDs, -`env`, `service`, and `version` to your logs by [following the APM Node.js instructions][3]. +If APM is enabled for this application, connect your logs and traces by [following the APM Node.js instructions][3]. This automatically adds trace IDs, span IDs, `env`, `service`, and `version` to your logs. **Note**: If the Datadog SDK injects `service` into your logs, it overrides the value set in the Agent configuration. ## Agentless logging -You can stream your logs from your application to Datadog without installing an Agent on your host. However, it is recommended that you use an Agent to forward your logs as it provides a native connection management. +You can stream your logs from your application to Datadog without installing an Agent on your host. However, Datadog recommends you use an Agent to forward your logs as it provides a native connection management. Use the [Winston HTTP transport][4] to send your logs directly through the [Datadog Log API][5]. + In your bootstrap file or in your code, declare the logger in the following way: ```javascript @@ -176,6 +249,7 @@ logger.info('Hello log with metas',{color: 'blue' }); **Note:** You can also use the community-supported [Datadog Transport][13]. +Bunyan and Pino don't include a built-in HTTP transport. To stream logs from these libraries directly to Datadog without an Agent, use a community-supported package or logging layer that adds Datadog HTTP support. ## Troubleshooting @@ -208,3 +282,5 @@ Make sure that the parameter `max_connect_retries` is not set to `1` (the defaul [12]: /logs/explorer/#overview [13]: https://github.com/winstonjs/winston/blob/master/docs/transports.md#datadog-transport [14]: /glossary/#tail +[15]: https://github.com/trentm/node-bunyan +[16]: https://github.com/pinojs/pino From 40133c212b67d751b8246ab16fcd74159657313c Mon Sep 17 00:00:00 2001 From: Max Phillips Date: Mon, 3 Aug 2026 14:42:04 -0500 Subject: [PATCH 2/6] Use inline links inside tab shortcodes Reference-style links don't resolve inside {{% tab %}} blocks, which render in an isolated context. Renumber remaining references. --- content/en/logs/log_collection/nodejs.md | 55 ++++++++++++------------ 1 file changed, 27 insertions(+), 28 deletions(-) diff --git a/content/en/logs/log_collection/nodejs.md b/content/en/logs/log_collection/nodejs.md index 7213bbf9c33..3bbf1c53bd9 100644 --- a/content/en/logs/log_collection/nodejs.md +++ b/content/en/logs/log_collection/nodejs.md @@ -26,7 +26,7 @@ further_reading: ## Configure your logger -To send your logs to Datadog, log to a file and [tail][14] that file with your Datadog Agent. Use a Node.js logging library, such as [Winston][1], [Bunyan][15], or [Pino][16], to log from your Node.js application. +To send your logs to Datadog, log to a file and [tail][13] that file with your Datadog Agent. Use a Node.js logging library, such as [Winston][1], [Bunyan][14], or [Pino][15], to log from your Node.js application. ### Log to a file @@ -35,7 +35,7 @@ In your bootstrap file or in your code, declare the logger in the following way: {{< tabs >}} {{% tab "Winston 3.0" %}} -Winston is available through [NPM][2]. Add the dependency to your code: +Winston is available through [NPM](https://www.npmjs.com). Add the dependency to your code: ```text npm install --save winston @@ -86,7 +86,7 @@ Check the content of the `.log` file to confirm that Winston is loggi {{% /tab %}} {{% tab "Winston 2.0" %}} -Winston is available through [NPM][2]. Add the dependency to your code: +Winston is available through [NPM](https://www.npmjs.com). Add the dependency to your code: ```text npm install --save winston @@ -121,7 +121,7 @@ Check the content of the `.log` file to confirm that Winston is loggi {{% /tab %}} {{% tab "Bunyan" %}} -Bunyan is available through [NPM][2]. Add the dependency to your code: +Bunyan is available through [NPM](https://www.npmjs.com). Add the dependency to your code: ```text npm install --save bunyan @@ -155,7 +155,7 @@ Bunyan logs in JSON by default. Check the content of the `.log` file {{% /tab %}} {{% tab "Pino" %}} -Pino is available through [NPM][2]. Add the dependency to your code: +Pino is available through [NPM](https://www.npmjs.com). Add the dependency to your code: ```text npm install --save pino @@ -183,9 +183,9 @@ Pino logs in JSON by default. Check the content of the `.log` file to ## Configure your Datadog Agent -After [log collection is enabled][6], set up [custom log collection][7] to tail your log files and send new logs to Datadog. +After [log collection is enabled][5], set up [custom log collection][6] to tail your log files and send new logs to Datadog. -1. Create a `nodejs.d/` folder in the `conf.d/` [Agent configuration directory][8]. +1. Create a `nodejs.d/` folder in the `conf.d/` [Agent configuration directory][7]. 2. Create a `conf.yaml` file in `nodejs.d/` with the following content: ```yaml @@ -203,14 +203,14 @@ logs: sourcecategory: sourcecode ``` -3. [Restart the Agent][9]. -4. Run the [Agent's status subcommand][10] and look for `nodejs` under the {{< ui >}}Checks{{< /ui >}} section to confirm logs are successfully submitted to Datadog. +3. [Restart the Agent][8]. +4. Run the [Agent's status subcommand][9] and look for `nodejs` under the {{< ui >}}Checks{{< /ui >}} section to confirm logs are successfully submitted to Datadog. -If logs are in JSON format, Datadog automatically [parses the log messages][11] to extract log attributes. Use the [Log Explorer][12] to view and troubleshoot your logs. +If logs are in JSON format, Datadog automatically [parses the log messages][10] to extract log attributes. Use the [Log Explorer][11] to view and troubleshoot your logs. ## Connect your service across logs and traces -If APM is enabled for this application, connect your logs and traces by [following the APM Node.js instructions][3]. This automatically adds trace IDs, span IDs, `env`, `service`, and `version` to your logs. +If APM is enabled for this application, connect your logs and traces by [following the APM Node.js instructions][2]. This automatically adds trace IDs, span IDs, `env`, `service`, and `version` to your logs. **Note**: If the Datadog SDK injects `service` into your logs, it overrides the value set in the Agent configuration. @@ -218,7 +218,7 @@ If APM is enabled for this application, connect your logs and traces by [followi You can stream your logs from your application to Datadog without installing an Agent on your host. However, Datadog recommends you use an Agent to forward your logs as it provides a native connection management. -Use the [Winston HTTP transport][4] to send your logs directly through the [Datadog Log API][5]. +Use the [Winston HTTP transport][3] to send your logs directly through the [Datadog Log API][4]. In your bootstrap file or in your code, declare the logger in the following way: @@ -247,7 +247,7 @@ logger.log('info', 'Hello simple log!'); logger.info('Hello log with metas',{color: 'blue' }); ``` -**Note:** You can also use the community-supported [Datadog Transport][13]. +**Note:** You can also use the community-supported [Datadog Transport][12]. Bunyan and Pino don't include a built-in HTTP transport. To stream logs from these libraries directly to Datadog without an Agent, use a community-supported package or logging layer that adds Datadog HTTP support. @@ -269,18 +269,17 @@ Make sure that the parameter `max_connect_retries` is not set to `1` (the defaul {{< partial name="whats-next/whats-next.html" >}} [1]: https://github.com/winstonjs/winston -[2]: https://www.npmjs.com -[3]: /tracing/other_telemetry/connect_logs_and_traces/nodejs/ -[4]: https://github.com/winstonjs/winston/blob/master/docs/transports.md#http-transport -[5]: /api/v1/logs/#send-logs -[6]: /agent/logs/?tab=tailfiles#activate-log-collection -[7]: /agent/logs/?tab=tailfiles#custom-log-collection -[8]: /agent/configuration/agent-configuration-files/?tab=agentv6v7#agent-configuration-directory -[9]: /agent/configuration/agent-commands/?tab=agentv6v7#restart-the-agent -[10]: /agent/configuration/agent-commands/?tab=agentv6v7#agent-status-and-information -[11]: /logs/log_configuration/parsing/?tab=matchers -[12]: /logs/explorer/#overview -[13]: https://github.com/winstonjs/winston/blob/master/docs/transports.md#datadog-transport -[14]: /glossary/#tail -[15]: https://github.com/trentm/node-bunyan -[16]: https://github.com/pinojs/pino +[2]: /tracing/other_telemetry/connect_logs_and_traces/nodejs/ +[3]: https://github.com/winstonjs/winston/blob/master/docs/transports.md#http-transport +[4]: /api/v1/logs/#send-logs +[5]: /agent/logs/?tab=tailfiles#activate-log-collection +[6]: /agent/logs/?tab=tailfiles#custom-log-collection +[7]: /agent/configuration/agent-configuration-files/?tab=agentv6v7#agent-configuration-directory +[8]: /agent/configuration/agent-commands/?tab=agentv6v7#restart-the-agent +[9]: /agent/configuration/agent-commands/?tab=agentv6v7#agent-status-and-information +[10]: /logs/log_configuration/parsing/?tab=matchers +[11]: /logs/explorer/#overview +[12]: https://github.com/winstonjs/winston/blob/master/docs/transports.md#datadog-transport +[13]: /glossary/#tail +[14]: https://github.com/trentm/node-bunyan +[15]: https://github.com/pinojs/pino From c160a78b9fce3cbfb1b1a9337d72e36309e5608b Mon Sep 17 00:00:00 2001 From: Max Phillips Date: Mon, 3 Aug 2026 14:46:00 -0500 Subject: [PATCH 3/6] Define NPM reference link inside each tab block Page-level reference definitions don't resolve inside tab shortcodes. Use in-block 101+ numbering, matching the convention used elsewhere. --- content/en/logs/log_collection/nodejs.md | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/content/en/logs/log_collection/nodejs.md b/content/en/logs/log_collection/nodejs.md index 3bbf1c53bd9..2c0fbcd1de0 100644 --- a/content/en/logs/log_collection/nodejs.md +++ b/content/en/logs/log_collection/nodejs.md @@ -35,7 +35,7 @@ In your bootstrap file or in your code, declare the logger in the following way: {{< tabs >}} {{% tab "Winston 3.0" %}} -Winston is available through [NPM](https://www.npmjs.com). Add the dependency to your code: +Winston is available through [NPM][101]. Add the dependency to your code: ```text npm install --save winston @@ -83,10 +83,11 @@ Check the content of the `.log` file to confirm that Winston is loggi {"color":"blue","level":"info","message":"Hello log with metas","timestamp":"2015-04-23T16:52:05.339Z"} ``` +[101]: https://www.npmjs.com {{% /tab %}} {{% tab "Winston 2.0" %}} -Winston is available through [NPM](https://www.npmjs.com). Add the dependency to your code: +Winston is available through [NPM][101]. Add the dependency to your code: ```text npm install --save winston @@ -118,10 +119,11 @@ Check the content of the `.log` file to confirm that Winston is loggi {"color":"blue","level":"info","message":"Hello log with metas","timestamp":"2015-04-23T16:52:05.339Z"} ``` +[101]: https://www.npmjs.com {{% /tab %}} {{% tab "Bunyan" %}} -Bunyan is available through [NPM](https://www.npmjs.com). Add the dependency to your code: +Bunyan is available through [NPM][101]. Add the dependency to your code: ```text npm install --save bunyan @@ -152,10 +154,11 @@ Bunyan logs in JSON by default. Check the content of the `.log` file {"name":"","hostname":"my-host","pid":1234,"level":30,"color":"blue","msg":"Hello log with metas","time":"2015-04-23T16:52:05.339Z","v":0} ``` +[101]: https://www.npmjs.com {{% /tab %}} {{% tab "Pino" %}} -Pino is available through [NPM](https://www.npmjs.com). Add the dependency to your code: +Pino is available through [NPM][101]. Add the dependency to your code: ```text npm install --save pino @@ -178,6 +181,7 @@ Pino logs in JSON by default. Check the content of the `.log` file to {"level":30,"time":1429807925339,"pid":1234,"hostname":"my-host","color":"blue","msg":"Hello log with metas"} ``` +[101]: https://www.npmjs.com {{% /tab %}} {{< /tabs >}} From 49cd9bae1d8b85a5b290d76220ae140b0d636293 Mon Sep 17 00:00:00 2001 From: Max Phillips Date: Mon, 3 Aug 2026 15:14:23 -0500 Subject: [PATCH 4/6] Clarify log collection works with any Node.js logging library Name Bunyan and Pino alongside Winston so the page doesn't read as requiring Winston. Also split a run-on sentence and fix two Vale substitutions on adjacent lines. --- content/en/logs/log_collection/nodejs.md | 150 ++++++----------------- 1 file changed, 36 insertions(+), 114 deletions(-) diff --git a/content/en/logs/log_collection/nodejs.md b/content/en/logs/log_collection/nodejs.md index 2c0fbcd1de0..db76b03106d 100644 --- a/content/en/logs/log_collection/nodejs.md +++ b/content/en/logs/log_collection/nodejs.md @@ -26,22 +26,15 @@ further_reading: ## Configure your logger -To send your logs to Datadog, log to a file and [tail][13] that file with your Datadog Agent. Use a Node.js logging library, such as [Winston][1], [Bunyan][14], or [Pino][15], to log from your Node.js application. +To send your logs to Datadog, log to a file and [tail][14] that file with your Datadog Agent. Use a Node.js logging library, such as [Winston][1], [Bunyan][15], or [Pino][16], to log from your Node.js application. The examples on this page use Winston. -### Log to a file - -In your bootstrap file or in your code, declare the logger in the following way: - -{{< tabs >}} -{{% tab "Winston 3.0" %}} - -Winston is available through [NPM][101]. Add the dependency to your code: +Winston is available through [NPM][2], to get started, you want to add the dependency to your code: ```text npm install --save winston ``` -`package.json` is updated with the corresponding dependency: +`package.json` is updated with the corresponding dependencies: ```js { @@ -56,6 +49,13 @@ npm install --save winston } ``` +### Log to a file + +In your bootstrap file or in your code, declare the logger in the following way: + +{{< tabs >}} +{{% tab "Winston 3.0" %}} + ```js const { createLogger, format, transports } = require('winston'); @@ -76,23 +76,9 @@ logger.log('info', 'Hello simple log!'); logger.info('Hello log with metas',{color: 'blue' }); ``` -Check the content of the `.log` file to confirm that Winston is logging in JSON: - -```json -{"level":"info","message":"Hello simple log!","timestamp":"2015-04-23T16:52:05.337Z"} -{"color":"blue","level":"info","message":"Hello log with metas","timestamp":"2015-04-23T16:52:05.339Z"} -``` - -[101]: https://www.npmjs.com {{% /tab %}} {{% tab "Winston 2.0" %}} -Winston is available through [NPM][101]. Add the dependency to your code: - -```text -npm install --save winston -``` - ```js var winston = require('winston'); @@ -112,6 +98,9 @@ logger.log('info', 'Hello simple log!'); logger.info('Hello log with metas',{color: 'blue' }); ``` +{{% /tab %}} +{{< /tabs >}} + Check the content of the `.log` file to confirm that Winston is logging in JSON: ```json @@ -119,77 +108,11 @@ Check the content of the `.log` file to confirm that Winston is loggi {"color":"blue","level":"info","message":"Hello log with metas","timestamp":"2015-04-23T16:52:05.339Z"} ``` -[101]: https://www.npmjs.com -{{% /tab %}} -{{% tab "Bunyan" %}} - -Bunyan is available through [NPM][101]. Add the dependency to your code: - -```text -npm install --save bunyan -``` - -```js -const bunyan = require('bunyan'); - -const logger = bunyan.createLogger({ - name: '', - streams: [ - { - level: 'info', - path: `${appRoot}/logs/.log`, - }, - ], -}); - -// Example logs -logger.info('Hello simple log!'); -logger.info({ color: 'blue' }, 'Hello log with metas'); -``` - -Bunyan logs in JSON by default. Check the content of the `.log` file to confirm: - -```json -{"name":"","hostname":"my-host","pid":1234,"level":30,"msg":"Hello simple log!","time":"2015-04-23T16:52:05.337Z","v":0} -{"name":"","hostname":"my-host","pid":1234,"level":30,"color":"blue","msg":"Hello log with metas","time":"2015-04-23T16:52:05.339Z","v":0} -``` - -[101]: https://www.npmjs.com -{{% /tab %}} -{{% tab "Pino" %}} - -Pino is available through [NPM][101]. Add the dependency to your code: - -```text -npm install --save pino -``` - -```js -const pino = require('pino'); - -const logger = pino(pino.destination(`${appRoot}/logs/.log`)); - -// Example logs -logger.info('Hello simple log!'); -logger.info({ color: 'blue' }, 'Hello log with metas'); -``` - -Pino logs in JSON by default. Check the content of the `.log` file to confirm: - -```json -{"level":30,"time":1429807925337,"pid":1234,"hostname":"my-host","msg":"Hello simple log!"} -{"level":30,"time":1429807925339,"pid":1234,"hostname":"my-host","color":"blue","msg":"Hello log with metas"} -``` - -[101]: https://www.npmjs.com -{{% /tab %}} -{{< /tabs >}} - ## Configure your Datadog Agent -After [log collection is enabled][5], set up [custom log collection][6] to tail your log files and send new logs to Datadog. +After [log collection is enabled][6], set up [custom log collection][7] to tail your log files and send new logs to Datadog. -1. Create a `nodejs.d/` folder in the `conf.d/` [Agent configuration directory][7]. +1. Create a `nodejs.d/` folder in the `conf.d/` [Agent configuration directory][8]. 2. Create a `conf.yaml` file in `nodejs.d/` with the following content: ```yaml @@ -207,14 +130,14 @@ logs: sourcecategory: sourcecode ``` -3. [Restart the Agent][8]. -4. Run the [Agent's status subcommand][9] and look for `nodejs` under the {{< ui >}}Checks{{< /ui >}} section to confirm logs are successfully submitted to Datadog. +3. [Restart the Agent][9]. +4. Run the [Agent's status subcommand][10] and look for `nodejs` under the {{< ui >}}Checks{{< /ui >}} section to confirm logs are successfully submitted to Datadog. -If logs are in JSON format, Datadog automatically [parses the log messages][10] to extract log attributes. Use the [Log Explorer][11] to view and troubleshoot your logs. +If logs are in JSON format, Datadog automatically [parses the log messages][11] to extract log attributes. Use the [Log Explorer][12] to view and troubleshoot your logs. ## Connect your service across logs and traces -If APM is enabled for this application, connect your logs and traces by [following the APM Node.js instructions][2]. This automatically adds trace IDs, span IDs, `env`, `service`, and `version` to your logs. +If APM is enabled for this application, connect your logs and traces by [following the APM Node.js instructions][3]. This automatically adds trace IDs, span IDs, `env`, `service`, and `version` to your logs. **Note**: If the Datadog SDK injects `service` into your logs, it overrides the value set in the Agent configuration. @@ -222,8 +145,7 @@ If APM is enabled for this application, connect your logs and traces by [followi You can stream your logs from your application to Datadog without installing an Agent on your host. However, Datadog recommends you use an Agent to forward your logs as it provides a native connection management. -Use the [Winston HTTP transport][3] to send your logs directly through the [Datadog Log API][4]. - +Use the [Winston HTTP transport][4] to send your logs directly through the [Datadog Log API][5]. In your bootstrap file or in your code, declare the logger in the following way: ```javascript @@ -251,9 +173,8 @@ logger.log('info', 'Hello simple log!'); logger.info('Hello log with metas',{color: 'blue' }); ``` -**Note:** You can also use the community-supported [Datadog Transport][12]. +**Note:** You can also use the community-supported [Datadog Transport][13]. -Bunyan and Pino don't include a built-in HTTP transport. To stream logs from these libraries directly to Datadog without an Agent, use a community-supported package or logging layer that adds Datadog HTTP support. ## Troubleshooting @@ -273,17 +194,18 @@ Make sure that the parameter `max_connect_retries` is not set to `1` (the defaul {{< partial name="whats-next/whats-next.html" >}} [1]: https://github.com/winstonjs/winston -[2]: /tracing/other_telemetry/connect_logs_and_traces/nodejs/ -[3]: https://github.com/winstonjs/winston/blob/master/docs/transports.md#http-transport -[4]: /api/v1/logs/#send-logs -[5]: /agent/logs/?tab=tailfiles#activate-log-collection -[6]: /agent/logs/?tab=tailfiles#custom-log-collection -[7]: /agent/configuration/agent-configuration-files/?tab=agentv6v7#agent-configuration-directory -[8]: /agent/configuration/agent-commands/?tab=agentv6v7#restart-the-agent -[9]: /agent/configuration/agent-commands/?tab=agentv6v7#agent-status-and-information -[10]: /logs/log_configuration/parsing/?tab=matchers -[11]: /logs/explorer/#overview -[12]: https://github.com/winstonjs/winston/blob/master/docs/transports.md#datadog-transport -[13]: /glossary/#tail -[14]: https://github.com/trentm/node-bunyan -[15]: https://github.com/pinojs/pino +[2]: https://www.npmjs.com +[3]: /tracing/other_telemetry/connect_logs_and_traces/nodejs/ +[4]: https://github.com/winstonjs/winston/blob/master/docs/transports.md#http-transport +[5]: /api/v1/logs/#send-logs +[6]: /agent/logs/?tab=tailfiles#activate-log-collection +[7]: /agent/logs/?tab=tailfiles#custom-log-collection +[8]: /agent/configuration/agent-configuration-files/?tab=agentv6v7#agent-configuration-directory +[9]: /agent/configuration/agent-commands/?tab=agentv6v7#restart-the-agent +[10]: /agent/configuration/agent-commands/?tab=agentv6v7#agent-status-and-information +[11]: /logs/log_configuration/parsing/?tab=matchers +[12]: /logs/explorer/#overview +[13]: https://github.com/winstonjs/winston/blob/master/docs/transports.md#datadog-transport +[14]: /glossary/#tail +[15]: https://github.com/trentm/node-bunyan +[16]: https://github.com/pinojs/pino From e16feec66edfa90ec3d365e1ac0e2b01038db250 Mon Sep 17 00:00:00 2001 From: Max Phillips Date: Mon, 3 Aug 2026 15:17:09 -0500 Subject: [PATCH 5/6] update pino link --- content/en/logs/log_collection/nodejs.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/en/logs/log_collection/nodejs.md b/content/en/logs/log_collection/nodejs.md index db76b03106d..d1d5492988c 100644 --- a/content/en/logs/log_collection/nodejs.md +++ b/content/en/logs/log_collection/nodejs.md @@ -208,4 +208,4 @@ Make sure that the parameter `max_connect_retries` is not set to `1` (the defaul [13]: https://github.com/winstonjs/winston/blob/master/docs/transports.md#datadog-transport [14]: /glossary/#tail [15]: https://github.com/trentm/node-bunyan -[16]: https://github.com/pinojs/pino +[16]: https://getpino.io/ From 3f0eefb8bce49e7ede66ccee0693532387ca8ae2 Mon Sep 17 00:00:00 2001 From: Max Phillips Date: Mon, 3 Aug 2026 16:17:33 -0500 Subject: [PATCH 6/6] Apply suggestions from code review Co-authored-by: Brett Blue <84536271+brett0000FF@users.noreply.github.com> --- content/en/logs/log_collection/nodejs.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content/en/logs/log_collection/nodejs.md b/content/en/logs/log_collection/nodejs.md index d1d5492988c..b14acf5e9b7 100644 --- a/content/en/logs/log_collection/nodejs.md +++ b/content/en/logs/log_collection/nodejs.md @@ -26,9 +26,9 @@ further_reading: ## Configure your logger -To send your logs to Datadog, log to a file and [tail][14] that file with your Datadog Agent. Use a Node.js logging library, such as [Winston][1], [Bunyan][15], or [Pino][16], to log from your Node.js application. The examples on this page use Winston. +To send your logs to Datadog, log to a file and [tail][14] that file with your Datadog Agent. Use a logging library, such as [Winston][1], [Bunyan][15], or [Pino][16], to log from your Node.js application. The examples on this page use Winston. -Winston is available through [NPM][2], to get started, you want to add the dependency to your code: +Winston is available through [NPM][2]. To get started, add the dependency to your code: ```text npm install --save winston