You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've noticed that some detectors make use of diag.info or diag.warn when they fail to do the detection. So with the default log level they are displayed in stdout.
OTEL_NODE_RESOURCE_DETECTORS=all node --require '@opentelemetry/auto-instrumentations-node/register' index.js
OTEL_TRACES_EXPORTER is empty. Using default otlp exporter.
OpenTelemetry automatic instrumentation started successfully
Container Detector failed to read the Container ID: ENOENT: no such file or directory, open '/proc/self/cgroup'
Process is not running on K8S [Error: ENOENT: no such file or directory, access '/var/run/secrets/kubernetes.io/serviceaccount/token'] {
errno: -2,
code: 'ENOENT',
syscall: 'access',
path: '/var/run/secrets/kubernetes.io/serviceaccount/token'
}
client response: 200 {
...
connection: 'close'
}
client response body lenght: 20669
The K8s message is scary if you're not familiar with the topic. Detectors just resolved that they're nor running in a container neither in an AWS cluster. So my proposal would be:
reduce the level to debug
rephrase the messages
The text was updated successfully, but these errors were encountered:
I've noticed that some detectors make use of
diag.info
ordiag.warn
when they fail to do the detection. So with the default log level they are displayed in stdout.A couple of places where it happens
opentelemetry-js-contrib/detectors/node/opentelemetry-resource-detector-container/src/detectors/ContainerDetector.ts
Line 116 in 6721bdd
opentelemetry-js-contrib/detectors/node/opentelemetry-resource-detector-aws/src/detectors/AwsEksDetector.ts
Line 91 in 6721bdd
This is not a problem per se but these messages appear if the customer enables some detectors that for sure will fail. Some examples:
OTEL_NODE_RESOURCE_DETECTORS=all
when using auto instrumentationsIMHO seeing messages about AWS when my app is running in another cloud could be a bit misleading. I'm attaching here a small repro
package.json
index.js
And this is what you get
The K8s message is scary if you're not familiar with the topic. Detectors just resolved that they're nor running in a container neither in an AWS cluster. So my proposal would be:
debug
The text was updated successfully, but these errors were encountered: