I am using running service on local on docker container, Also my APM is running on docker. Locally it is working fine and population transactions entry for every API in the service but when I am deploying my service on the server (also docker) and APM on server also runs on docker but unable to populate transactions for API. It shows nothing.
Strangely, I am able to create service on the server.
this is how I am starting APM. TIA
const config = require('../globals/config');
let apm = {};
// start APM
module.exports = ({logger}) => {
if (typeof config.get('server:apm_server') !== 'undefined') {
apm = require('elastic-apm-node').start({
serviceName: config.get('server:apm_server:apm_service_name'),
serverUrl: `${config.get('server:apm_server:host')}:${config.get('server:apm_server:port')}`, // set custom APM Server URL (default: http://localhost:8200)
serviceVersion: config.get('app:version'),
captureBody: 'all',
metricsInterval: '60s'
});
logger.info(' [\u2713] APM [ready]');
return apm
} else
logger.info(' [\u2a2f] APM not enabled');
}