From 592f33292c77bb41ab65d0d128c2439de3e4632c Mon Sep 17 00:00:00 2001 From: Aleksandra Spilkowska Date: Fri, 13 Feb 2026 12:10:44 +0100 Subject: [PATCH 1/2] docs: add applies_to frontmatter and scope Filebeat section to Stack - Add mandatory applies_to (stack: ga, serverless: ga) and products to all four doc pages per Docs Versioning contributor guidelines. - Add section-level applies_to to Step 3: Configure Filebeat on winston, pino, and morgan (stack: ga, serverless: unavailable) so Serverless users see that the Filebeat collection path does not apply to them. Co-authored-by: Cursor --- docs/reference/index.md | 3 +++ docs/reference/morgan.md | 8 ++++++++ docs/reference/pino.md | 8 ++++++++ docs/reference/winston.md | 8 ++++++++ 4 files changed, 27 insertions(+) diff --git a/docs/reference/index.md b/docs/reference/index.md index 3a0f904..b4148eb 100644 --- a/docs/reference/index.md +++ b/docs/reference/index.md @@ -1,4 +1,7 @@ --- +applies_to: + stack: ga + serverless: ga mapped_pages: - https://www.elastic.co/guide/en/ecs-logging/nodejs/current/intro.html - https://www.elastic.co/guide/en/ecs-logging/nodejs/current/index.html diff --git a/docs/reference/morgan.md b/docs/reference/morgan.md index 3f99fb5..a05573a 100644 --- a/docs/reference/morgan.md +++ b/docs/reference/morgan.md @@ -1,4 +1,7 @@ --- +applies_to: + stack: ga + serverless: ga mapped_pages: - https://www.elastic.co/guide/en/ecs-logging/nodejs/current/morgan.html --- @@ -39,6 +42,11 @@ app.listen(3000); ### Step 3: Configure Filebeat [morgan-setup-step-3] +```{applies_to} +stack: ga +serverless: unavailable +``` + The best way to collect the logs once they are ECS-formatted is with [Filebeat](beats://reference/filebeat/index.md): :::::::{tab-set} diff --git a/docs/reference/pino.md b/docs/reference/pino.md index bdecbe1..0c26aac 100644 --- a/docs/reference/pino.md +++ b/docs/reference/pino.md @@ -1,4 +1,7 @@ --- +applies_to: + stack: ga + serverless: ga mapped_pages: - https://www.elastic.co/guide/en/ecs-logging/nodejs/current/pino.html --- @@ -38,6 +41,11 @@ See usage discussion and examples below. ### Step 3: Configure Filebeat [pino-setup-step-3] +```{applies_to} +stack: ga +serverless: unavailable +``` + The best way to collect the logs once they are ECS-formatted is with [Filebeat](beats://reference/filebeat/index.md): :::::::{tab-set} diff --git a/docs/reference/winston.md b/docs/reference/winston.md index 65f7b06..b55d386 100644 --- a/docs/reference/winston.md +++ b/docs/reference/winston.md @@ -1,4 +1,7 @@ --- +applies_to: + stack: ga + serverless: ga mapped_pages: - https://www.elastic.co/guide/en/ecs-logging/nodejs/current/winston.html --- @@ -41,6 +44,11 @@ logger.error('oops there is a problem', { err: new Error('boom') }); ### Step 3: Configure Filebeat [winston-setup-step-3] +```{applies_to} +stack: ga +serverless: unavailable +``` + The best way to collect the logs once they are ECS-formatted is with [Filebeat](beats://reference/filebeat/index.md): :::::::{tab-set} From bc21f5dca0210e30bda8725a281d148838eb1ee2 Mon Sep 17 00:00:00 2001 From: Aleksandra Spilkowska Date: Mon, 16 Feb 2026 12:41:16 +0100 Subject: [PATCH 2/2] correct apostrophe usage in Node.js ECS logging documentation --- docs/reference/index.md | 4 ++-- docs/reference/pino.md | 4 ++-- docs/reference/winston.md | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/reference/index.md b/docs/reference/index.md index b4148eb..c2a56e9 100644 --- a/docs/reference/index.md +++ b/docs/reference/index.md @@ -9,7 +9,7 @@ mapped_pages: # ECS Logging Node.js [intro] -Node.js ECS loggers are formatter plugins for your favorite logging libraries. They make it easy to format your logs into ECS-compatible JSON. In combination with [filebeat](https://www.elastic.co/products/beats/filebeat) you can send your logs directly to Elasticsearch and leverage [Kibana’s Logs app](docs-content://solutions/observability/logs/explore-logs.md) to inspect all logs in one single place. +Node.js ECS loggers are formatter plugins for your favorite logging libraries. They make it easy to format your logs into ECS-compatible JSON. In combination with [filebeat](https://www.elastic.co/products/beats/filebeat) you can send your logs directly to Elasticsearch and leverage [Kibana's Logs app](docs-content://solutions/observability/logs/explore-logs.md) to inspect all logs in one single place. The Node.js ECS logging formatters log structured JSON and support serialization of Error objects and HTTP Request and Response objects from Node.js core and popular web frameworks. A minimal log record includes the following fields: @@ -33,5 +33,5 @@ Ready to jump into Node.js ECS logging? * [ECS Logging with Winston](/reference/winston.md) * [ECS Logging with Morgan](/reference/morgan.md) -If you’d like to try out a tutorial using Node.js ECS logging with winston, see [Ingest logs from a Node.js web application using Filebeat](docs-content://manage-data/ingest/ingesting-data-from-applications/ingest-logs-from-nodejs-web-application-using-filebeat.md). +If you'd like to try out a tutorial using Node.js ECS logging with winston, see [Ingest logs from a Node.js web application using Filebeat](docs-content://manage-data/ingest/ingesting-data-from-applications/ingest-logs-from-nodejs-web-application-using-filebeat.md). diff --git a/docs/reference/pino.md b/docs/reference/pino.md index 0c26aac..ade071a 100644 --- a/docs/reference/pino.md +++ b/docs/reference/pino.md @@ -33,7 +33,7 @@ log.error({ err: new Error('boom') }, 'oops there is a problem'); // ... ``` -1. This will [configure](https://getpino.io/#/docs/api?id=options) Pino’s `formatters`, `messageKey` and `timestamp` options. +1. This will [configure](https://getpino.io/#/docs/api?id=options) Pino's `formatters`, `messageKey` and `timestamp` options. See usage discussion and examples below. @@ -193,7 +193,7 @@ will yield (pretty-printed for readability): } ``` -This is analogous to and overrides [Pino’s default err serializer](https://getpino.io/#/docs/api?id=serializers-object). Special handling of the `err` field can be disabled via the `convertErr: false` option: +This is analogous to and overrides [Pino's default err serializer](https://getpino.io/#/docs/api?id=serializers-object). Special handling of the `err` field can be disabled via the `convertErr: false` option: ```js const log = pino(ecsFormat({ convertErr: false })); diff --git a/docs/reference/winston.md b/docs/reference/winston.md index b55d386..14617ac 100644 --- a/docs/reference/winston.md +++ b/docs/reference/winston.md @@ -176,7 +176,7 @@ Running this script (available [here](https://github.com/elastic/ecs-logging-nod {"@timestamp":"2023-10-14T02:14:17.304Z","log.level":"error","message":"oops there is a problem","ecs.version":"8.10.0","foo":"bar"} ``` -The formatter handles serialization to JSON, so you don’t need to add the [json](https://github.com/winstonjs/logform#json) formatter. As well, a timestamp is automatically generated by the formatter, so you don’t need to add the [timestamp](https://github.com/winstonjs/logform#timestamp) formatter. +The formatter handles serialization to JSON, so you don't need to add the [json](https://github.com/winstonjs/logform#json) formatter. As well, a timestamp is automatically generated by the formatter, so you don't need to add the [timestamp](https://github.com/winstonjs/logform#timestamp) formatter. ## Error logging [winston-error-logging]