Skip to content

Commit

Permalink
Changed error logging to warnings for unknown OTEL_NODE_RESOURCE_DETE…
Browse files Browse the repository at this point in the history
…CTORS 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.
  • Loading branch information
RichardChukwu authored Oct 2, 2024
1 parent 3007d3e commit 98cd591
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion experimental/packages/opentelemetry-sdk-node/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export function getResourceDetectorsFromEnv(): Array<DetectorSync> {
return resourceDetectorsFromEnv.flatMap(detector => {
const resourceDetector = resourceDetectors.get(detector);
if (!resourceDetector) {
diag.error(
diag.warn(

Check warning on line 57 in experimental/packages/opentelemetry-sdk-node/src/utils.ts

View check run for this annotation

Codecov / codecov/patch

experimental/packages/opentelemetry-sdk-node/src/utils.ts#L57

Added line #L57 was not covered by tests
`Invalid resource detector "${detector}" specified in the environment variable OTEL_NODE_RESOURCE_DETECTORS`
);
}
Expand Down

0 comments on commit 98cd591

Please sign in to comment.