apm-agent-nodejs
apm-agent-nodejs copied to clipboard
MongoDB Span doesn't have the correct MongoDB command name
Describe the bug
The MongoDB span is not always showing the correct command i.e. find instead of findOne
Expected behavior
To show the same MongoDB command as is being used.
Environment (please complete the following information)
- OS: Linux
- Node.js version: 12
- APM Server version: 3.2.0
- MongoDB version: 3.4.0
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
Additional context
In the image below the span name starting with MongoDB is a span we manually added which shows the correct MongoDB command findOne