Go to Elastic Cloud (https://cloud.elastic.co and create an account and a deployment
Make sure you select the Hot/Warm template, which includes APM and is ready for Observability
Then go to the tutorial and select the language you want to use. That is under /app/kibana#/home/tutorial/apm
in Kibana
Download the sample code at https://raw.githubusercontent.com/gmoskovicz/apm_gettingstarted/master/main.js which includes a sample NodeJs application with the APM Agent configured.
var apm = require('elastic-apm-node').start({
// Override service name from package.json
// Allowed characters: a-z, A-Z, 0-9, -, _, and space
serviceName: 'mysampleapp',
// Use if APM Server requires a token
secretToken: 'xxxxx',
// Set custom APM Server URL (default: http://localhost:8200)
serverUrl: 'https://xxxx.apm.us-east-1.aws.cloud.es.io:xxxx'
})
Run the prerequisites in your console. You will need to add the APM Node agent dependency, along with the elasticsearch NodeJS client to call the health API:
sudo npm install elastic-apm-node --save
sudo npm install @elastic/elasticsearch
Then, just run the application by running in your console node main.js
Now you can go to APM where the magic begins