import apmConfig from './apmConfig' ; function initApm ( serviceName ) { const config = apmConfig . server ( serviceName ) ; if ( process . env . NODE_ENV !== 'test' && config . serverUrl ) { require ( 'elastic-apm-node' ) . start ( config ) ; } } module . exports = initApm ;