This is short presentation of Elastic APM set up. This set of tools can be used to present flow of information in microservices based system, leting user find out which applications participate in communication and how long each step takes.
- java 1.8
- docker
- docker-compose
- kibana:7.3.1
- elasticsearch:7.3.1
- apm-server:7.3.1
- apm-agent:1.9.0
- springboot:2.1.7
To run infrastructure execute:
docker-compose -f infrastructure/docker-compose.yml up -d
To run apps, execute in server
and frontend
folders:
./run_app.sh
Server is available at: link
Frontend is available at: link
Kibana should be available at link with no errors
You can check if infrastructure is in place visiting kibana apm setup
Apm page is available at link Chose frontend and on the bottom of the page select transaction. If no transactions are available visit frontend to generate some traffic and refresh kibana's apm page.
If everything is up and running explore available data.
-
You can see stats like transaction duration and request per minute charts. Let's explore one of the transactions. Choose
FrontendRestEndpoint#test
from transactions list at the bottom of the page -
Have a look on transaction sample at the bottom of the page and it's content
- services participating in transaction (frontend and server)
- timeline of transaction
- custom scope of operation shown on timeline (longRunningMethod)
- duration of executed sql query (bottom line) and query itself
- APM may not be not available after firs start, try:
docker-compose -f infrastructure/docker-compose.yml restart apm
- If your have an obscure problem with elasticsearch shards please try:
curl -XPUT -H 'Content-Type: application/json' 'localhost:9200/_settings' -d '
{
"index" : {
"number_of_replicas" : 0
}
}'