-
Notifications
You must be signed in to change notification settings - Fork 232
Open
Description
Describe the bug
From Elastic migrate from apm attacher to EDOT, it was mentioned that using the original APM agent for Node.js should still work. However, after following the guide, the pod is initializing but encountering an error 'cp: can't stat '/autoinstrumentation/.': No such file or directory'. It appears that the APM agent for Node.js is missing the expected autoinstrumentation directory.
To Reproduce
Steps to reproduce the behavior:
- Applied the Instrumentation config
apiVersion: opentelemetry.io/v1alpha1
kind: Instrumentation
metadata:
name: elastic-apm-instrumentation
namespace: system
spec:
exporter:
endpoint: http://opentelemetry-kube-stack-daemon-collector.opentelemetry.svc.cluster.local:4318
java:
image: docker.elastic.co/observability/apm-agent-java:1.53.0
env:
- name: ELASTIC_APM_SERVER_URL
value: "xxx"
- name: ELASTIC_APM_API_KEY
value: "xxx"
- name: ELASTIC_APM_ENVIRONMENT
value: "STAGING"
- name: ELASTIC_APM_LOG_SENDING
value: "true"
- name: ELASTIC_APM_LOG_LEVEL
value: "info"
nodejs:
image: docker.elastic.co/observability/apm-agent-nodejs:4.13.0
env:
- name: ELASTIC_APM_SERVER_URL
value: "xxx"
- name: ELASTIC_APM_API_KEY
value: "xxx"
- name: ELASTIC_APM_CAPTURE_BODY
value: "all"
- name: ELASTIC_APM_LOG_LEVEL
value: "trace"
- add annotation: instrumentation.opentelemetry.io/inject-nodejs: "system/elastic-apm-instrumentation"
- pod initing get error "cp: can't stat '/autoinstrumentation/.': No such file or directory"
Expected behavior
It can see log in APM
Environment (please complete the following information)
- OS: Linux/ AWS EKS
- Node.js version: 20
- APM Server version: 8.18.0
- Agent version: 4.13.0
How are you starting the agent? (please tick one of the boxes)
K8s auto-instrumentation