-
Notifications
You must be signed in to change notification settings - Fork 533
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When using auto-instrumentations-node, some values of OTEL_NODE_RESOURCE_DETECTORS
are treated as invalid
#2311
Comments
@qbedard Thanks for the issue, and the PR. I believe what is happening here is that those For example:
Observe that there are two diag error messages about the invalid "foo" resource detector name.
I believe an appropriate fix for this would be to improve the NodeSDK constructor to not do the Would you be interested in attempting a PR that does that? |
…RCE_DETECTORS values When NodeSDK is configured with explicit 'resourceDetectors' or with 'autoDetectResources: false', then it should not emit diag errors about unknown values in OTEL_NODE_RESOURCE_DETECTORS. This can happen when that envvar is used with @opentelemetry/auto-instrumentation-node Closes: open-telemetry/opentelemetry-js-contrib#2311
…RCE_DETECTORS values (#4879) * fix(sdk-node): avoid spurious diag errors for unknown OTEL_NODE_RESOURCE_DETECTORS values When NodeSDK is configured with explicit 'resourceDetectors' or with 'autoDetectResources: false', then it should not emit diag errors about unknown values in OTEL_NODE_RESOURCE_DETECTORS. This can happen when that envvar is used with @opentelemetry/auto-instrumentation-node Closes: open-telemetry/opentelemetry-js-contrib#2311 * add a changelog entry * lint:fix
…RCE_DETECTORS values (open-telemetry#4879) * fix(sdk-node): avoid spurious diag errors for unknown OTEL_NODE_RESOURCE_DETECTORS values When NodeSDK is configured with explicit 'resourceDetectors' or with 'autoDetectResources: false', then it should not emit diag errors about unknown values in OTEL_NODE_RESOURCE_DETECTORS. This can happen when that envvar is used with @opentelemetry/auto-instrumentation-node Closes: open-telemetry/opentelemetry-js-contrib#2311 * add a changelog entry * lint:fix
What version of OpenTelemetry are you using?
@opentelemetry/[email protected]
@opentelemetry/[email protected]
@opentelemetry/[email protected]
@opentelemetry/[email protected]
@opentelemetry/[email protected]
@opentelemetry/[email protected]
@opentelemetry/[email protected]
@opentelemetry/[email protected]
@opentelemetry/[email protected]
What version of Node are you using?
18.12.1
What did you do?
Use auto-instrumentations-node with
OTEL_NODE_RESOURCE_DETECTORS
set toaws,env,host,os
.What did you expect to see?
AWS resource detector is enabled.
What did you see instead?
Additional context
This conditional is evaluating to
false
-y and appears to do so for all resource detectors that are of typeDetector
orDetector[]
. Those that have values ofDetectorSync
orDetectorSync[]
do work, so the issue is likely that aDetector
instance is evaluating tofalse
-y and the linked conditional or the detector map needs to be updated to evaluate those values properly.The text was updated successfully, but these errors were encountered: