elastic / elastic/apm-agent-nodejs
Fastify-cli compatibility
- Dominant language
- JavaScript
- Stars
- 594
- Forks
- 244
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 16
Description
**Describe the bug**
Using https://github.com/fastify/fastify-cli generator, the server is starting with the start script on package.json and the app is loaded as a plugin (app.js).
APM should be on the top of the Fastify module but, considering it's a dependency, it's not possible to add it. Putting it on the top of the plugin (app.js) doesn't work.
**To Reproduce**
Steps to reproduce the behavior:
1. Use this config (on app.js)
```js
require('elastic-apm-node').start({
//MY PARAMS
logLevel: 'trace'
})
```
2. Then call 'npm start'
3. See no shimming logs
**Expected behavior**
Start APM agent for Fastify
**Environment (please complete the following information)**
- OS: [e.g. Linux]
- Node.js version: 12.13.1
- APM Server version: 7.6.1
- Agent version: Fastify
**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`
Contributor guide
Assessment
This issue has not been assessed yet.