elastic / elastic/apm-agent-nodejs
APM Not working, data not show up in Kibana
- Dominant language
- JavaScript
- Stars
- 594
- Forks
- 244
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 16
Description
**Describe the bug**
APM Data is not showing up / sent to APM Server in Elastic Cloud when running inside Kubernetes Container.
**To Reproduce**
Steps to reproduce the behavior:
1. Elastic Cloud
Deployment version: v8.0.0
2. Node Application Config
node: v16.14.0
express: v4.17.1
typescript: v4.2.3
elastic-apm-node: v3.29.0
OS: Pods using `node:16-slim` as Base Image, deployed on GKE
**How are you starting the agent? (please tick one of the boxes)**
We run the docker from `CMD bash ./entrypoint.sh`
the sh script will load the env and run node `index.js` that start with code below:
```ts
import apm from 'elastic-apm-node'
apm.start({
// Override service name from package.json
// Allowed characters: a-z, A-Z, 0-9, -, _, and space
serviceName: 'service-name',
environment: 'production',
active: true,
secretToken: '',
serverUrl: ''
})
import './App'
```
**Additional context**
- When running with `node dist/index.js` or `ELASTIC_APM_ACTIVE=true ELASTIC_APM_SECRET_TOKEN= ELASTIC_APM_SERVER_URL= pm2 start --name implikasi dist/index.js`, the apm agent run fine, and data is shown in Kibana Dashbard
 But when I run inside Docker/Kubernetes, there's no metrics sent.
- We hardcoded the APM config, still not working
**Expected behavior**
APM Data show up in Kibana Observability Dashboard
Is there any step that I missed? I'm confused what is the root cause of this.
Contributor guide
Assessment
This issue has not been assessed yet.