x-pack/solutions/observability/plugins/apm/dev_docs/local_setup.md
git clone [email protected]:elastic/kibana.git
cd kibana/
yarn kbn bootstrap
yarn start
To access an Elasticsearch instance that has live data you have three options:
Start Elasticsearch & Kibana
Elasticsearch:
yarn es snapshot
Kibana:
yarn start
Run Synthtrace
node scripts/synthtrace simple_trace.ts --local
The --local flag is a shortcut to specifying --target and --kibana. It autodiscovers the current kibana basepath and installs the appropiate APM package.
Connect Kibana to ES
Update config/kibana.dev.yml with:
elasticsearch.hosts: http://localhost:9200
elasticsearch.username: kibana_system
elasticsearch.password: changeme
Documentation for Synthtrace
Use the oblt-cli to connect to a cloud-based ES cluster.
Run Synthtrace
If you want to bootstrap some data on a cloud instance you can also use the following
node scripts/synthtrace simple_trace.ts --cloudId "myname:<base64string>" --maxDocs 100000
Docker Compose is required
git clone [email protected]:elastic/apm-integration-testing.git
cd apm-integration-testing/
./scripts/compose.py start master --all --no-kibana
Update config/kibana.dev.yml with:
elasticsearch.hosts: http://localhost:9200
elasticsearch.username: admin
elasticsearch.password: changeme
APM behaves differently depending on which role and permissions a logged in user has. To create APM users run:
node x-pack/solutions/observability/plugins/apm/scripts/create_apm_users.js --username admin --password changeme --kibana-url http://localhost:5601
This will create:
viewer role (read-only)editor role (read/write)All APM api endpoints accept _inspect=true as a query param that will output all Elasticsearch queries performed in that request. It will be available in the browser response and on localhost it is also available in the Kibana Node.js process output.
Example:
/internal/apm/services/my_service?_inspect=true