apm-agent-nodejs
apm-agent-nodejs copied to clipboard
Fastify-cli compatibility
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:
- Use this config (on app.js)
require('elastic-apm-node').start({
//MY PARAMS
logLevel: 'trace'
})
- Then call 'npm start'
- 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/startfrom within the source code - [ ] Starting node with
-r elastic-apm-node/start