If you are asking about a problem you are experiencing, please use the following template, as it will help us help you. If you have a different problem, please delete all of this text
TIP 1: select at least one tag that further categorizes your topic. For example server for APM Server related questions, java for questions regarding the Elastic APM Java agent, or ui for questions about the APM App within Kibana.
TIP 2: Check out the troubleshooting guide first. Not only will it help you to resolve common problems faster but it also explains in more detail which information we need before we can properly help you.
Kibana version: 8.8.1
Elasticsearch version: 8.8.1
APM Server version: 8.8.1
APM Agent language and version: "@opentelemetry/api": "^1.7.0" and "@opentelemetry/auto-instrumentations-node": "^0.41.1"
**Fresh install
I am trying to instrument my nodejs application to send traces to elastic apm.
Steps:
I have sample hellow world nodejs application
i did npm install --save @opentelemetry/api and npm install --save @opentelemetry/auto-instrumentations-node
Started the app with command - env OTEL_TRACES_EXPORTER=otlp OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=<took the endpoint from integrations tab> OTEL_EXPORTER_OTLP_HEADERS="Authorization=Bearer xxxxxxxxxxxx" node --require @opentelemetry/auto-instrumentations-node/register app.js
App is starting fine and also the traces were coming but on start up I am getting errors related to kubernetes. Below are the application log on start up
@opentelemetry/instrumentation-grpc Module @grpc/grpc-js has been loaded before @opentelemetry/instrumentation-grpc so it might not work, please initialize it before requiring @grpc/grpc-js
OpenTelemetry automatic instrumentation started successfully
no original function cpSync to wrap
no original function cp to wrap
no original function cp to wrap
Example app listening on port 3000!
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'
}
Welcome back! I did find a related issue on the OTel JS agent GitHub:
There are a couple of references issues in that one that might be worth taking a look at as well, or potentially commenting on for help. But that looks to be an issue with the OTel JS agent rather than the ingestion to Elastic APM.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.