elastic / elastic/apm-agent-nodejs

MongoDB Span doesn't have the correct MongoDB command name

Open
#1,567 0 comments 0 reactions 0 assignees View on GitHub
agent-nodejs bug
Dominant language
JavaScript
Stars
594
Forks
244
Avg merge
1d 8h
Merged PRs (30d)
16

Description

**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/start` from 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`

Screenshot 2019-12-12 at 21 49 03

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.