Getting startededit

Install the APM agent for JavaScript as a dependency to your application:

npm install elastic-apm-js-base --save

Configure the agent:

import { init as initApm } from 'elastic-apm-js-base'
var apm = initApm({

  // Set custom APM Server URL (default: http://localhost:8200)
  serverUrl: 'http://localhost:8200',

  // Set required service name
  serviceName: 'service-name',

  // Set service version (required for sourcemap feature)
  serviceVersion: 'service-version'
})