From 98cd5917bd639ff677a591d9e7cc7d94fc78cff4 Mon Sep 17 00:00:00 2001 From: Richard Chukwu <79311274+RichardChukwu@users.noreply.github.com> Date: Wed, 2 Oct 2024 20:52:12 +0100 Subject: [PATCH 1/4] Changed error logging to warnings for unknown OTEL_NODE_RESOURCE_DETECTORS values as per issue #4882. I referenced the OpenTelemetry specification document, which clarified that diag.warn should be used for unrecognized values that don't critically break the system. --- experimental/packages/opentelemetry-sdk-node/src/utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/experimental/packages/opentelemetry-sdk-node/src/utils.ts b/experimental/packages/opentelemetry-sdk-node/src/utils.ts index bae8a028e6..293a3e3485 100644 --- a/experimental/packages/opentelemetry-sdk-node/src/utils.ts +++ b/experimental/packages/opentelemetry-sdk-node/src/utils.ts @@ -54,7 +54,7 @@ export function getResourceDetectorsFromEnv(): Array { return resourceDetectorsFromEnv.flatMap(detector => { const resourceDetector = resourceDetectors.get(detector); if (!resourceDetector) { - diag.error( + diag.warn( `Invalid resource detector "${detector}" specified in the environment variable OTEL_NODE_RESOURCE_DETECTORS` ); } From 6e8b9a115224f36ca7c21d9b5d9bfcafd8af8755 Mon Sep 17 00:00:00 2001 From: Richard Chukwu <79311274+RichardChukwu@users.noreply.github.com> Date: Thu, 3 Oct 2024 10:42:58 +0100 Subject: [PATCH 2/4] Update CHANGELOG.md bugfix changelog entry --- experimental/CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/experimental/CHANGELOG.md b/experimental/CHANGELOG.md index 04ea9a97b3..0f798b4448 100644 --- a/experimental/CHANGELOG.md +++ b/experimental/CHANGELOG.md @@ -46,6 +46,7 @@ All notable changes to experimental packages in this project will be documented * `appendResourcePathToUrlIfNeeded` * `configureExporterTimeout` * `invalidTimeout` +* Changed `diag.error` to `diag.warn` for unknown `OTEL_NODE_RESOURCE_DETECTORS` values in [#4882](https://github.com/open-telemetry/opentelemetry-js/issues/4882). ### :books: (Refine Doc) From fa4956e999b67defb12049264cc0980d501e9165 Mon Sep 17 00:00:00 2001 From: Richard Chukwu <79311274+RichardChukwu@users.noreply.github.com> Date: Thu, 3 Oct 2024 14:03:49 +0100 Subject: [PATCH 3/4] Update CHANGELOG.md --- experimental/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/experimental/CHANGELOG.md b/experimental/CHANGELOG.md index 0f798b4448..252d3a31a0 100644 --- a/experimental/CHANGELOG.md +++ b/experimental/CHANGELOG.md @@ -46,7 +46,7 @@ All notable changes to experimental packages in this project will be documented * `appendResourcePathToUrlIfNeeded` * `configureExporterTimeout` * `invalidTimeout` -* Changed `diag.error` to `diag.warn` for unknown `OTEL_NODE_RESOURCE_DETECTORS` values in [#4882](https://github.com/open-telemetry/opentelemetry-js/issues/4882). +* fix(sdk-node): use warn instead of error on unknown OTEL_NODE_RESOURCE_DETECTORS values [#5034](https://github.com/open-telemetry/opentelemetry-js/pull/5034)) ### :books: (Refine Doc) From d51bda9ac402ca5728afbef1a90ea7c5764cf6bb Mon Sep 17 00:00:00 2001 From: Marc Pichler Date: Thu, 3 Oct 2024 16:46:03 +0200 Subject: [PATCH 4/4] Update experimental/CHANGELOG.md --- experimental/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/experimental/CHANGELOG.md b/experimental/CHANGELOG.md index 252d3a31a0..49eb60e237 100644 --- a/experimental/CHANGELOG.md +++ b/experimental/CHANGELOG.md @@ -46,7 +46,7 @@ All notable changes to experimental packages in this project will be documented * `appendResourcePathToUrlIfNeeded` * `configureExporterTimeout` * `invalidTimeout` -* fix(sdk-node): use warn instead of error on unknown OTEL_NODE_RESOURCE_DETECTORS values [#5034](https://github.com/open-telemetry/opentelemetry-js/pull/5034)) +* fix(sdk-node): use warn instead of error on unknown OTEL_NODE_RESOURCE_DETECTORS values [#5034](https://github.com/open-telemetry/opentelemetry-js/pull/5034) ### :books: (Refine Doc)