about the flow where to add ? it about bin/elasticsearch file?
Then configure the elastic-apm module inside your application by adding the following lines to the very top of your application code:
// Add this to the VERY top of the first file loaded in your app
var apm = require('elastic-apm').start({
// Set required app name (allowed characters: a-z, A-Z, 0-9, -, _, and space)
appName: '',
// Set custom APM Server URL (default: http://localhost:8200)
serverUrl: ''
})