Skip to content

This is short presentation of Elastic APM set up with two samll spring-boot apps.

Notifications You must be signed in to change notification settings

regnen/elastic-apm-example

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Purpose of this project

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.

Requirements

  • java 1.8
  • docker
  • docker-compose

Used tools

  • kibana:7.3.1
  • elasticsearch:7.3.1
  • apm-server:7.3.1
  • apm-agent:1.9.0
  • springboot:2.1.7

How to run

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
Check if everything is running:

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.

Available data

If everything is up and running explore available data.

  • Choose frontend as a service which stats you will explore frontend service selection

  • 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 frontend service selection

  • 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

frontend service selection

Troubleshooting

  • 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
    }
}'

About

This is short presentation of Elastic APM set up with two samll spring-boot apps.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 70.3%
  • Shell 20.3%
  • Dockerfile 9.4%