From dd0521aa6f2b9aa15f28536deec06f470f0a51c9 Mon Sep 17 00:00:00 2001 From: JamieDanielson Date: Wed, 10 Jul 2024 17:05:34 -0400 Subject: [PATCH 01/15] [operator/nodejs] document disabling node auto-instrumentations --- .../en/docs/kubernetes/operator/automatic.md | 17 +++++++++++ content/en/docs/zero-code/js/configuration.md | 30 +++++++++++++++---- 2 files changed, 42 insertions(+), 5 deletions(-) diff --git a/content/en/docs/kubernetes/operator/automatic.md b/content/en/docs/kubernetes/operator/automatic.md index 22bd2963d3b2..a5b87f119c7b 100644 --- a/content/en/docs/kubernetes/operator/automatic.md +++ b/content/en/docs/kubernetes/operator/automatic.md @@ -300,6 +300,23 @@ spec: value: http,nestjs-core # comma-separated list of the instrumentation package names without the `@opentelemetry/instrumentation-` prefix. ``` +To keep all default libraries and disable only specific instrumentation +libraries you can use the `OTEL_NODE_DISABLED_INSTRUMENTATIONS` environment +variable as documented in the +[Node.js zero-code instrumentation documentation](/docs/zero-code/js/configuration/#excluding-instrumentation-libraries). + +```yaml +apiVersion: opentelemetry.io/v1alpha1 +kind: Instrumentation +# ... other fields skipped from this example +spec: + # ... other fields skipped from this example + nodejs: + env: + - name: OTEL_NODE_DISABLED_INSTRUMENTATIONS + value: fs # comma-separated list of the instrumentation package names without the `@opentelemetry/instrumentation-` prefix. +``` + #### Learn more {#js-learn-more} For more details, see diff --git a/content/en/docs/zero-code/js/configuration.md b/content/en/docs/zero-code/js/configuration.md index d680f052eefd..5c79b4883c20 100644 --- a/content/en/docs/zero-code/js/configuration.md +++ b/content/en/docs/zero-code/js/configuration.md @@ -45,14 +45,19 @@ For example, to only enable the `env` and `host` detectors, you can set: OTEL_NODE_RESOURCE_DETECTORS=env,host ``` -### Excluding instrumentation libraries +## Excluding instrumentation libraries By default, all [supported instrumentation libraries](https://github.com/open-telemetry/opentelemetry-js-contrib/blob/main/metapackages/auto-instrumentations-node/README.md#supported-instrumentations) -are enabled, but you can use the environment variable -`OTEL_NODE_ENABLED_INSTRUMENTATIONS` to enable only certain instrumentations by -providing a comma-separated list of the instrumentation package names without -the `@opentelemetry/instrumentation-` prefix. +are enabled, but you can use environment variables to enable or disable specific +instrumentations. + +### Enable specific instrumentations + +Use the environment variable `OTEL_NODE_ENABLED_INSTRUMENTATIONS` to enable only +certain instrumentations by providing a comma-separated list of the +instrumentation package names without the `@opentelemetry/instrumentation-` +prefix. For example, to enable only [@opentelemetry/instrumentation-http](https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-instrumentation-http) @@ -63,3 +68,18 @@ instrumentations: ```shell OTEL_NODE_ENABLED_INSTRUMENTATIONS="http,express" ``` + +### Disable specific instrumentations + +Use the environment variable `OTEL_NODE_DISABLED_INSTRUMENTATIONS` to keep the +fully enabled list and only disable certain instrumentations by providing a +comma-separated list of the instrumentation package names without the +`@opentelemetry/instrumentation-` prefix. + +For example, to disable only +[@opentelemetry/instrumentation-fs](fss://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-instrumentation-http) +instrumentation: + +```shell +OTEL_NODE_DISABLED_INSTRUMENTATIONS="fs" +``` From 402d82f60705c3cf83456147923085d1e317b5b6 Mon Sep 17 00:00:00 2001 From: JamieDanielson Date: Wed, 10 Jul 2024 17:17:58 -0400 Subject: [PATCH 02/15] add second instr to example --- content/en/docs/kubernetes/operator/automatic.md | 2 +- content/en/docs/zero-code/js/configuration.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/content/en/docs/kubernetes/operator/automatic.md b/content/en/docs/kubernetes/operator/automatic.md index a5b87f119c7b..728b9dfc9614 100644 --- a/content/en/docs/kubernetes/operator/automatic.md +++ b/content/en/docs/kubernetes/operator/automatic.md @@ -314,7 +314,7 @@ spec: nodejs: env: - name: OTEL_NODE_DISABLED_INSTRUMENTATIONS - value: fs # comma-separated list of the instrumentation package names without the `@opentelemetry/instrumentation-` prefix. + value: fs,grpc # comma-separated list of the instrumentation package names without the `@opentelemetry/instrumentation-` prefix. ``` #### Learn more {#js-learn-more} diff --git a/content/en/docs/zero-code/js/configuration.md b/content/en/docs/zero-code/js/configuration.md index 5c79b4883c20..0943f91c617f 100644 --- a/content/en/docs/zero-code/js/configuration.md +++ b/content/en/docs/zero-code/js/configuration.md @@ -81,5 +81,5 @@ For example, to disable only instrumentation: ```shell -OTEL_NODE_DISABLED_INSTRUMENTATIONS="fs" +OTEL_NODE_DISABLED_INSTRUMENTATIONS="fs,grpc" ``` From f20ac0c686ce5b93deca22a5ee7233107f517fde Mon Sep 17 00:00:00 2001 From: JamieDanielson Date: Wed, 10 Jul 2024 17:51:38 -0400 Subject: [PATCH 03/15] fix links for disabled packages --- content/en/docs/zero-code/js/configuration.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/content/en/docs/zero-code/js/configuration.md b/content/en/docs/zero-code/js/configuration.md index 0943f91c617f..dad73317b7f5 100644 --- a/content/en/docs/zero-code/js/configuration.md +++ b/content/en/docs/zero-code/js/configuration.md @@ -77,8 +77,10 @@ comma-separated list of the instrumentation package names without the `@opentelemetry/instrumentation-` prefix. For example, to disable only -[@opentelemetry/instrumentation-fs](fss://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-instrumentation-http) -instrumentation: +[@opentelemetry/instrumentation-fs](https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/plugins/node/instrumentation-fs) +and +[@opentelemetry/instrumentation-grpc](https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/packages/opentelemetry-instrumentation-grpc) +instrumentations: ```shell OTEL_NODE_DISABLED_INSTRUMENTATIONS="fs,grpc" From 2e5d71a0cbec711772bb0ddf9bee56435f3ec493 Mon Sep 17 00:00:00 2001 From: JamieDanielson Date: Wed, 10 Jul 2024 17:52:05 -0400 Subject: [PATCH 04/15] fix old link while im here --- content/en/docs/zero-code/js/configuration.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/en/docs/zero-code/js/configuration.md b/content/en/docs/zero-code/js/configuration.md index dad73317b7f5..c391819b875f 100644 --- a/content/en/docs/zero-code/js/configuration.md +++ b/content/en/docs/zero-code/js/configuration.md @@ -60,7 +60,7 @@ instrumentation package names without the `@opentelemetry/instrumentation-` prefix. For example, to enable only -[@opentelemetry/instrumentation-http](https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-instrumentation-http) +[@opentelemetry/instrumentation-http](https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/packages/opentelemetry-instrumentation-http) and [@opentelemetry/instrumentation-express](https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/plugins/node/opentelemetry-instrumentation-express) instrumentations: From 498d878d8c95c4d1845e4f65d19a47c99f2ea847 Mon Sep 17 00:00:00 2001 From: Jamie Danielson Date: Thu, 11 Jul 2024 17:11:27 -0400 Subject: [PATCH 05/15] Update wording from PR feedback Co-authored-by: Patrice Chalin --- content/en/docs/kubernetes/operator/automatic.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content/en/docs/kubernetes/operator/automatic.md b/content/en/docs/kubernetes/operator/automatic.md index 728b9dfc9614..a92b36bc3126 100644 --- a/content/en/docs/kubernetes/operator/automatic.md +++ b/content/en/docs/kubernetes/operator/automatic.md @@ -302,8 +302,8 @@ spec: To keep all default libraries and disable only specific instrumentation libraries you can use the `OTEL_NODE_DISABLED_INSTRUMENTATIONS` environment -variable as documented in the -[Node.js zero-code instrumentation documentation](/docs/zero-code/js/configuration/#excluding-instrumentation-libraries). +variable. For details, see +[Excluding instrumentation libraries](/docs/zero-code/js/configuration/#excluding-instrumentation-libraries). ```yaml apiVersion: opentelemetry.io/v1alpha1 From 125f9981de09262c2e8ed0604d72f674207ac3c5 Mon Sep 17 00:00:00 2001 From: JamieDanielson Date: Tue, 16 Jul 2024 18:16:36 -0400 Subject: [PATCH 06/15] add caveat for enabling both env vars --- content/en/docs/kubernetes/operator/automatic.md | 5 ++++- content/en/docs/zero-code/js/configuration.md | 3 +++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/content/en/docs/kubernetes/operator/automatic.md b/content/en/docs/kubernetes/operator/automatic.md index a92b36bc3126..bac70f645e58 100644 --- a/content/en/docs/kubernetes/operator/automatic.md +++ b/content/en/docs/kubernetes/operator/automatic.md @@ -302,7 +302,7 @@ spec: To keep all default libraries and disable only specific instrumentation libraries you can use the `OTEL_NODE_DISABLED_INSTRUMENTATIONS` environment -variable. For details, see +variable. For details, see [Excluding instrumentation libraries](/docs/zero-code/js/configuration/#excluding-instrumentation-libraries). ```yaml @@ -317,6 +317,9 @@ spec: value: fs,grpc # comma-separated list of the instrumentation package names without the `@opentelemetry/instrumentation-` prefix. ``` +> Note that `OTEL_NODE_ENABLED_INSTRUMENTATIONS` and `OTEL_NODE_DISABLED_INSTRUMENTATIONS` are mutually exclusive. +> If both are set, all instrumentations will be disabled. + #### Learn more {#js-learn-more} For more details, see diff --git a/content/en/docs/zero-code/js/configuration.md b/content/en/docs/zero-code/js/configuration.md index c391819b875f..691ea53fad31 100644 --- a/content/en/docs/zero-code/js/configuration.md +++ b/content/en/docs/zero-code/js/configuration.md @@ -85,3 +85,6 @@ instrumentations: ```shell OTEL_NODE_DISABLED_INSTRUMENTATIONS="fs,grpc" ``` + +> Note that `OTEL_NODE_ENABLED_INSTRUMENTATIONS` and `OTEL_NODE_DISABLED_INSTRUMENTATIONS` are mutually exclusive. +> If both are set, all instrumentations will be disabled. From 3a8e923d8dfca0721927ea780a64683f783cccc4 Mon Sep 17 00:00:00 2001 From: JamieDanielson Date: Tue, 16 Jul 2024 18:22:05 -0400 Subject: [PATCH 07/15] replace package with library --- content/en/docs/zero-code/js/configuration.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/en/docs/zero-code/js/configuration.md b/content/en/docs/zero-code/js/configuration.md index f5f0998884b0..d88506530b5b 100644 --- a/content/en/docs/zero-code/js/configuration.md +++ b/content/en/docs/zero-code/js/configuration.md @@ -73,7 +73,7 @@ OTEL_NODE_ENABLED_INSTRUMENTATIONS="http,express" Use the environment variable `OTEL_NODE_DISABLED_INSTRUMENTATIONS` to keep the fully enabled list and only disable certain instrumentations by providing a -comma-separated list of the instrumentation package names without the +comma-separated list of the instrumentation library names without the `@opentelemetry/instrumentation-` prefix. For example, to disable only From 9cd7b8ca8736074391579fd03a3b1980d756a2c3 Mon Sep 17 00:00:00 2001 From: JamieDanielson Date: Tue, 16 Jul 2024 18:24:27 -0400 Subject: [PATCH 08/15] npm run fix format --- content/en/docs/kubernetes/operator/automatic.md | 5 +++-- content/en/docs/zero-code/js/configuration.md | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/content/en/docs/kubernetes/operator/automatic.md b/content/en/docs/kubernetes/operator/automatic.md index bac70f645e58..1ae74d8100a2 100644 --- a/content/en/docs/kubernetes/operator/automatic.md +++ b/content/en/docs/kubernetes/operator/automatic.md @@ -317,8 +317,9 @@ spec: value: fs,grpc # comma-separated list of the instrumentation package names without the `@opentelemetry/instrumentation-` prefix. ``` -> Note that `OTEL_NODE_ENABLED_INSTRUMENTATIONS` and `OTEL_NODE_DISABLED_INSTRUMENTATIONS` are mutually exclusive. -> If both are set, all instrumentations will be disabled. +> Note that `OTEL_NODE_ENABLED_INSTRUMENTATIONS` and +> `OTEL_NODE_DISABLED_INSTRUMENTATIONS` are mutually exclusive. If both are set, +> all instrumentations will be disabled. #### Learn more {#js-learn-more} diff --git a/content/en/docs/zero-code/js/configuration.md b/content/en/docs/zero-code/js/configuration.md index d88506530b5b..66201de85961 100644 --- a/content/en/docs/zero-code/js/configuration.md +++ b/content/en/docs/zero-code/js/configuration.md @@ -86,5 +86,6 @@ instrumentations: OTEL_NODE_DISABLED_INSTRUMENTATIONS="fs,grpc" ``` -> Note that `OTEL_NODE_ENABLED_INSTRUMENTATIONS` and `OTEL_NODE_DISABLED_INSTRUMENTATIONS` are mutually exclusive. -> If both are set, all instrumentations will be disabled. +> Note that `OTEL_NODE_ENABLED_INSTRUMENTATIONS` and +> `OTEL_NODE_DISABLED_INSTRUMENTATIONS` are mutually exclusive. If both are set, +> all instrumentations will be disabled. From 7d57ad60fcf7dc9c0a7d3c64195eae5809726a16 Mon Sep 17 00:00:00 2001 From: JamieDanielson Date: Tue, 16 Jul 2024 18:36:09 -0400 Subject: [PATCH 09/15] use note alert for better highlighting --- content/en/docs/kubernetes/operator/automatic.md | 9 ++++++--- content/en/docs/zero-code/js/configuration.md | 10 +++++++--- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/content/en/docs/kubernetes/operator/automatic.md b/content/en/docs/kubernetes/operator/automatic.md index 1ae74d8100a2..070fcb0b6ecf 100644 --- a/content/en/docs/kubernetes/operator/automatic.md +++ b/content/en/docs/kubernetes/operator/automatic.md @@ -317,9 +317,12 @@ spec: value: fs,grpc # comma-separated list of the instrumentation package names without the `@opentelemetry/instrumentation-` prefix. ``` -> Note that `OTEL_NODE_ENABLED_INSTRUMENTATIONS` and -> `OTEL_NODE_DISABLED_INSTRUMENTATIONS` are mutually exclusive. If both are set, -> all instrumentations will be disabled. +{{% alert title="Notes" color="info" %}} + +Note that `OTEL_NODE_ENABLED_INSTRUMENTATIONS` and +`OTEL_NODE_DISABLED_INSTRUMENTATIONS` are mutually exclusive. If both are set, +all instrumentations will be disabled. +{{% /alert %}} #### Learn more {#js-learn-more} diff --git a/content/en/docs/zero-code/js/configuration.md b/content/en/docs/zero-code/js/configuration.md index 66201de85961..3210ee774024 100644 --- a/content/en/docs/zero-code/js/configuration.md +++ b/content/en/docs/zero-code/js/configuration.md @@ -86,6 +86,10 @@ instrumentations: OTEL_NODE_DISABLED_INSTRUMENTATIONS="fs,grpc" ``` -> Note that `OTEL_NODE_ENABLED_INSTRUMENTATIONS` and -> `OTEL_NODE_DISABLED_INSTRUMENTATIONS` are mutually exclusive. If both are set, -> all instrumentations will be disabled. +{{% alert title="Notes" color="info" %}} + +`OTEL_NODE_ENABLED_INSTRUMENTATIONS` and +`OTEL_NODE_DISABLED_INSTRUMENTATIONS` are mutually exclusive. If both are set, +all instrumentations will be disabled. + +{{% /alert %}} From 4691f0109a92cf497b527c8f70516077c133ab39 Mon Sep 17 00:00:00 2001 From: JamieDanielson Date: Tue, 16 Jul 2024 18:37:37 -0400 Subject: [PATCH 10/15] npm run fix format --- content/en/docs/kubernetes/operator/automatic.md | 1 + content/en/docs/zero-code/js/configuration.md | 5 ++--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/content/en/docs/kubernetes/operator/automatic.md b/content/en/docs/kubernetes/operator/automatic.md index 070fcb0b6ecf..845ca501c876 100644 --- a/content/en/docs/kubernetes/operator/automatic.md +++ b/content/en/docs/kubernetes/operator/automatic.md @@ -322,6 +322,7 @@ spec: Note that `OTEL_NODE_ENABLED_INSTRUMENTATIONS` and `OTEL_NODE_DISABLED_INSTRUMENTATIONS` are mutually exclusive. If both are set, all instrumentations will be disabled. + {{% /alert %}} #### Learn more {#js-learn-more} diff --git a/content/en/docs/zero-code/js/configuration.md b/content/en/docs/zero-code/js/configuration.md index 3210ee774024..295c06d2188a 100644 --- a/content/en/docs/zero-code/js/configuration.md +++ b/content/en/docs/zero-code/js/configuration.md @@ -88,8 +88,7 @@ OTEL_NODE_DISABLED_INSTRUMENTATIONS="fs,grpc" {{% alert title="Notes" color="info" %}} -`OTEL_NODE_ENABLED_INSTRUMENTATIONS` and -`OTEL_NODE_DISABLED_INSTRUMENTATIONS` are mutually exclusive. If both are set, -all instrumentations will be disabled. +`OTEL_NODE_ENABLED_INSTRUMENTATIONS` and `OTEL_NODE_DISABLED_INSTRUMENTATIONS` +are mutually exclusive. If both are set, all instrumentations will be disabled. {{% /alert %}} From 67e6a2acef30d89affb58ed711ce26fc5168142e Mon Sep 17 00:00:00 2001 From: JamieDanielson Date: Tue, 16 Jul 2024 18:38:57 -0400 Subject: [PATCH 11/15] change will be to are (present tense) --- content/en/docs/kubernetes/operator/automatic.md | 2 +- content/en/docs/zero-code/js/configuration.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/content/en/docs/kubernetes/operator/automatic.md b/content/en/docs/kubernetes/operator/automatic.md index 845ca501c876..55f2c7827a2c 100644 --- a/content/en/docs/kubernetes/operator/automatic.md +++ b/content/en/docs/kubernetes/operator/automatic.md @@ -321,7 +321,7 @@ spec: Note that `OTEL_NODE_ENABLED_INSTRUMENTATIONS` and `OTEL_NODE_DISABLED_INSTRUMENTATIONS` are mutually exclusive. If both are set, -all instrumentations will be disabled. +all instrumentations are disabled. {{% /alert %}} diff --git a/content/en/docs/zero-code/js/configuration.md b/content/en/docs/zero-code/js/configuration.md index 295c06d2188a..1c62429d43c6 100644 --- a/content/en/docs/zero-code/js/configuration.md +++ b/content/en/docs/zero-code/js/configuration.md @@ -89,6 +89,6 @@ OTEL_NODE_DISABLED_INSTRUMENTATIONS="fs,grpc" {{% alert title="Notes" color="info" %}} `OTEL_NODE_ENABLED_INSTRUMENTATIONS` and `OTEL_NODE_DISABLED_INSTRUMENTATIONS` -are mutually exclusive. If both are set, all instrumentations will be disabled. +are mutually exclusive. If both are set, all instrumentations are disabled. {{% /alert %}} From 57c570a5686f4a0642f9f6363af508d756b08c53 Mon Sep 17 00:00:00 2001 From: JamieDanielson Date: Tue, 23 Jul 2024 15:53:49 -0400 Subject: [PATCH 12/15] clarify what actually happens with both env vars --- content/en/docs/kubernetes/operator/automatic.md | 7 ++++--- content/en/docs/zero-code/js/configuration.md | 6 ++++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/content/en/docs/kubernetes/operator/automatic.md b/content/en/docs/kubernetes/operator/automatic.md index 55f2c7827a2c..db040d436a37 100644 --- a/content/en/docs/kubernetes/operator/automatic.md +++ b/content/en/docs/kubernetes/operator/automatic.md @@ -319,9 +319,10 @@ spec: {{% alert title="Notes" color="info" %}} -Note that `OTEL_NODE_ENABLED_INSTRUMENTATIONS` and -`OTEL_NODE_DISABLED_INSTRUMENTATIONS` are mutually exclusive. If both are set, -all instrumentations are disabled. +If both environment variables are set, `OTEL_NODE_ENABLED_INSTRUMENTATIONS` is +applied first, and then `OTEL_NODE_DISABLED_INSTRUMENTATIONS` is applied to that +list. Therefore, if the same instrumentation is included in both lists, that +instrumentation will be disabled. {{% /alert %}} diff --git a/content/en/docs/zero-code/js/configuration.md b/content/en/docs/zero-code/js/configuration.md index 1c62429d43c6..75c687285ec5 100644 --- a/content/en/docs/zero-code/js/configuration.md +++ b/content/en/docs/zero-code/js/configuration.md @@ -88,7 +88,9 @@ OTEL_NODE_DISABLED_INSTRUMENTATIONS="fs,grpc" {{% alert title="Notes" color="info" %}} -`OTEL_NODE_ENABLED_INSTRUMENTATIONS` and `OTEL_NODE_DISABLED_INSTRUMENTATIONS` -are mutually exclusive. If both are set, all instrumentations are disabled. +If both environment variables are set, `OTEL_NODE_ENABLED_INSTRUMENTATIONS` is +applied first, and then `OTEL_NODE_DISABLED_INSTRUMENTATIONS` is applied to that +list. Therefore, if the same instrumentation is included in both lists, that +instrumentation will be disabled. {{% /alert %}} From 0e4df3a8957bf4751522ba9164d74a34af91e36a Mon Sep 17 00:00:00 2001 From: JamieDanielson Date: Tue, 23 Jul 2024 15:57:25 -0400 Subject: [PATCH 13/15] the alert is less intense now :) --- content/en/docs/kubernetes/operator/automatic.md | 12 ++++-------- content/en/docs/zero-code/js/configuration.md | 12 ++++-------- 2 files changed, 8 insertions(+), 16 deletions(-) diff --git a/content/en/docs/kubernetes/operator/automatic.md b/content/en/docs/kubernetes/operator/automatic.md index db040d436a37..5eca24528a68 100644 --- a/content/en/docs/kubernetes/operator/automatic.md +++ b/content/en/docs/kubernetes/operator/automatic.md @@ -317,14 +317,10 @@ spec: value: fs,grpc # comma-separated list of the instrumentation package names without the `@opentelemetry/instrumentation-` prefix. ``` -{{% alert title="Notes" color="info" %}} - -If both environment variables are set, `OTEL_NODE_ENABLED_INSTRUMENTATIONS` is -applied first, and then `OTEL_NODE_DISABLED_INSTRUMENTATIONS` is applied to that -list. Therefore, if the same instrumentation is included in both lists, that -instrumentation will be disabled. - -{{% /alert %}} +> If both environment variables are set, `OTEL_NODE_ENABLED_INSTRUMENTATIONS` is +> applied first, and then `OTEL_NODE_DISABLED_INSTRUMENTATIONS` is applied to +> that list. Therefore, if the same instrumentation is included in both lists, +> that instrumentation will be disabled. #### Learn more {#js-learn-more} diff --git a/content/en/docs/zero-code/js/configuration.md b/content/en/docs/zero-code/js/configuration.md index 75c687285ec5..d3f8f04d97da 100644 --- a/content/en/docs/zero-code/js/configuration.md +++ b/content/en/docs/zero-code/js/configuration.md @@ -86,11 +86,7 @@ instrumentations: OTEL_NODE_DISABLED_INSTRUMENTATIONS="fs,grpc" ``` -{{% alert title="Notes" color="info" %}} - -If both environment variables are set, `OTEL_NODE_ENABLED_INSTRUMENTATIONS` is -applied first, and then `OTEL_NODE_DISABLED_INSTRUMENTATIONS` is applied to that -list. Therefore, if the same instrumentation is included in both lists, that -instrumentation will be disabled. - -{{% /alert %}} +> If both environment variables are set, `OTEL_NODE_ENABLED_INSTRUMENTATIONS` is +> applied first, and then `OTEL_NODE_DISABLED_INSTRUMENTATIONS` is applied to +> that list. Therefore, if the same instrumentation is included in both lists, +> that instrumentation will be disabled. From 268735f534ff30bcd784439881375154997d5277 Mon Sep 17 00:00:00 2001 From: Severin Neumann Date: Wed, 24 Jul 2024 10:57:38 +0200 Subject: [PATCH 14/15] Apply suggestions from code review --- content/en/docs/kubernetes/operator/automatic.md | 12 ++++++++---- content/en/docs/zero-code/js/configuration.md | 12 ++++++++---- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/content/en/docs/kubernetes/operator/automatic.md b/content/en/docs/kubernetes/operator/automatic.md index d86d03000f5d..f40b02f9fb08 100644 --- a/content/en/docs/kubernetes/operator/automatic.md +++ b/content/en/docs/kubernetes/operator/automatic.md @@ -317,10 +317,14 @@ spec: value: fs,grpc # comma-separated list of the instrumentation package names without the `@opentelemetry/instrumentation-` prefix. ``` -> If both environment variables are set, `OTEL_NODE_ENABLED_INSTRUMENTATIONS` is -> applied first, and then `OTEL_NODE_DISABLED_INSTRUMENTATIONS` is applied to -> that list. Therefore, if the same instrumentation is included in both lists, -> that instrumentation will be disabled. +{{% alert title="Note" color="info" %}} + +If both environment variables are set, `OTEL_NODE_ENABLED_INSTRUMENTATIONS` is +applied first, and then `OTEL_NODE_DISABLED_INSTRUMENTATIONS` is applied to +that list. Therefore, if the same instrumentation is included in both lists, +that instrumentation will be disabled. + +{{% /alert %}} #### Learn more {#js-learn-more} diff --git a/content/en/docs/zero-code/js/configuration.md b/content/en/docs/zero-code/js/configuration.md index d3f8f04d97da..c9357504f913 100644 --- a/content/en/docs/zero-code/js/configuration.md +++ b/content/en/docs/zero-code/js/configuration.md @@ -86,7 +86,11 @@ instrumentations: OTEL_NODE_DISABLED_INSTRUMENTATIONS="fs,grpc" ``` -> If both environment variables are set, `OTEL_NODE_ENABLED_INSTRUMENTATIONS` is -> applied first, and then `OTEL_NODE_DISABLED_INSTRUMENTATIONS` is applied to -> that list. Therefore, if the same instrumentation is included in both lists, -> that instrumentation will be disabled. +{{% alert title="Note" color="info" %}} + +If both environment variables are set, `OTEL_NODE_ENABLED_INSTRUMENTATIONS` is +applied first, and then `OTEL_NODE_DISABLED_INSTRUMENTATIONS` is applied to +that list. Therefore, if the same instrumentation is included in both lists, +that instrumentation will be disabled. + +{{% /alert %}} From 1ef981916a270fc0ca8fe0b9b63c9e8f1af7bc65 Mon Sep 17 00:00:00 2001 From: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com> Date: Wed, 24 Jul 2024 09:03:03 +0000 Subject: [PATCH 15/15] Results from /fix:all --- content/en/docs/kubernetes/operator/automatic.md | 6 +++--- content/en/docs/zero-code/js/configuration.md | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/content/en/docs/kubernetes/operator/automatic.md b/content/en/docs/kubernetes/operator/automatic.md index f40b02f9fb08..00bd1227fa36 100644 --- a/content/en/docs/kubernetes/operator/automatic.md +++ b/content/en/docs/kubernetes/operator/automatic.md @@ -320,9 +320,9 @@ spec: {{% alert title="Note" color="info" %}} If both environment variables are set, `OTEL_NODE_ENABLED_INSTRUMENTATIONS` is -applied first, and then `OTEL_NODE_DISABLED_INSTRUMENTATIONS` is applied to -that list. Therefore, if the same instrumentation is included in both lists, -that instrumentation will be disabled. +applied first, and then `OTEL_NODE_DISABLED_INSTRUMENTATIONS` is applied to that +list. Therefore, if the same instrumentation is included in both lists, that +instrumentation will be disabled. {{% /alert %}} diff --git a/content/en/docs/zero-code/js/configuration.md b/content/en/docs/zero-code/js/configuration.md index c9357504f913..3bf7fc47cf99 100644 --- a/content/en/docs/zero-code/js/configuration.md +++ b/content/en/docs/zero-code/js/configuration.md @@ -89,8 +89,8 @@ OTEL_NODE_DISABLED_INSTRUMENTATIONS="fs,grpc" {{% alert title="Note" color="info" %}} If both environment variables are set, `OTEL_NODE_ENABLED_INSTRUMENTATIONS` is -applied first, and then `OTEL_NODE_DISABLED_INSTRUMENTATIONS` is applied to -that list. Therefore, if the same instrumentation is included in both lists, -that instrumentation will be disabled. +applied first, and then `OTEL_NODE_DISABLED_INSTRUMENTATIONS` is applied to that +list. Therefore, if the same instrumentation is included in both lists, that +instrumentation will be disabled. {{% /alert %}}