apm-agent-nodejs: Transaction name is `${method} unknown route` in Koa
Describe the bug
Kibana APM UI shows all transaction name as ${method} unknown route
. I think it should be ${method} ${path}
. How should I fix?
To Reproduce Steps to reproduce the behavior: No configuration. Imported on the top of main script file.
Expected behavior
I think it should be ${method} ${path}
.
Environment (please complete the following information)
- OS: Ubuntu 16.04 LTS
- Node.js version: 10.15.0
- APM Server version: 6.5.4
- Agent version: 2.1.0
How are you starting the agent? (please tick one of the boxes)
- 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 Add any other context about the problem here.
-
Agent config options
Click to expand
replace this line with your agent config options
-
package.json
dependencies:Click to expand
replace this line with your dependencies section from package.json
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 19 (19 by maintainers)
@sibelius the
require-in-the-middle
module uses thedebug
module for outputting debug info. So if you use the environment variableDEBUG
you can get it to output debug information:Ah, I figured it out! I’m now able to recreate this locally.
In a temp directory, you can recreated it by doing the following:
Where
test.js
contains the following:This will nest the
node_modules
folder inside it self which will trip up our algorithm.