opened 07:23AM - 31 Aug 23 UTC
triage
agent-nodejs
community
**Describe the bug**
Having these options in the configuration of your library …does NOT work at all! We still have to define the env `ELASTIC_APM_SECRET_TOKEN` and `ELASTIC_APM_SERVER_URL` in our pod spec!
**To Reproduce**
Steps to reproduce the behavior:
1. Use this config '...'
2. Then call '....'
3. Then do '....'
4. See error
**Expected behavior**
**Environment (please complete the following information)**
- OS: [e.g. Linux] Ubuntu 23.04
- Node.js version:
- APM Server version:
- Agent version:
**How are you starting the agent? (please tick one of the boxes)**
- [ x] Calling `agent.start()` directly (e.g. `require('elastic-apm-node').start(...)`)
- [ ] Requiring `elastic-apm-node/start` from within the source code
- [ ] Starting node with `-r elastic-apm-node/start`
**Additional context**
Agent config options:
<details>
<summary>Click to expand</summary>
```
var apm = require('elastic-apm-node').start({
// Override service name from package.json
// Allowed characters: a-z, A-Z, 0-9, -, _, and space
serviceName: 'my-apm',
secretToken: process.env.ELASTIC_APM_SECRET_TOKEN,
// Set custom APM Server URL (default: http://127.0.0.1:8200)
serverUrl: 'https://my-apm-http:8200',
// Only activate the agent if it's running in production
active: process.env.NODE_ENV === 'production',
// verifyServerCert: false,
serverCaCertFile: '/etc/ca-certificates/tls.crt',
```
</details>
`package.json` dependencies:
<details>
<summary>Click to expand</summary>
```
replace this line with your dependencies section from package.json
```
</details>