Getting startededit

Using Package Managersedit

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

npm install @elastic/apm-rum --save

Configure the agent:

import { init as initApm } from '@elastic/apm-rum'
const apm = initApm({

  // Set required service name (allowed characters: a-z, A-Z, 0-9, -, _, and space)
  serviceName: '',

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

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

Using Script Tagsedit

Add a <script> tag to the HTML page and use the elasticApm global object to load and initialize the agent:


Please download the latest version of JavaScript agent from GitHub or UNPKG and host the file in your Server/CDN before deploying to production.

<script src="" crossorigin></script>
    serviceName: '',
    serverUrl: 'http://localhost:8200',

Currently our minified JavaScript bundle is about 16KB (gzipped).