opentelemetry-js icon indicating copy to clipboard operation
opentelemetry-js copied to clipboard

diag.error about unknown OTEL_NODE_RESOURCE_DETECTORS entry should be diag.warn

Open trentm opened this issue 1 year ago • 0 comments

https://github.com/open-telemetry/opentelemetry-js/blob/34003c9b7ef7e7e95e86986550d1c7fb6c1c56c6/experimental/packages/opentelemetry-sdk-node/src/utils.ts#L56-L60

Currently it is a diag.error, but I think it should be a diag.warn.

https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/sdk-environment-variables.md#enum-value says:

if the user provides a value the implementation does not recognize, the implementation MUST generate a warning and gracefully ignore the setting.

Originally posted by @trentm in https://github.com/open-telemetry/opentelemetry-js/pull/4879#discussion_r1693649192


There is a similar diag.error in auto-instrumentations-node that I think should be a diag.warn as well: https://github.com/open-telemetry/opentelemetry-js-contrib/blob/6e8989de4d60c32bc9b3e3ef760e92c68ae7f491/metapackages/auto-instrumentations-node/src/utils.ts#L280

trentm avatar Jul 26 '24 22:07 trentm