The following code is a sample application used to demonstrate how Digma can help demystify code by providing visibility into code paths, breakdown, identifying performance bottlenecks and runtime errors.
We took the original application of PetClinic and added some common coding anti-patterns that would often be detected in real-world codebases.
- Clone this project to your machine and open it in IntelliJ.
- Make sure to select 'Gradle Project' when prompted
- run the following command in order prepare the
environment:
./gradlew bootJar
1.Install the Digma Plugin . You can also just search for it in the IDE settings Plugins section. 2.Click the 'Digma' icon on the right side of the screen and walk through the two quick setup steps.
Notice that feedback will start appearing in the 'Observabiliy' panel below. You may then click a specific endpoint to explore further, more insights and analytics will apear the more you use the application.
Select the 'petclinic-service' configuration and run or debug it locally. You can either use the 'ClientTester' task to generate some actions or just browse directly to the PetClinic main page.
Run the application using the included Docker Compose file
docker-compose up --build
Browse to Local PetClinic and use the application freely.
Within few minutes Digma should have collect the traces and analyze them already. Meanwhile you can open the UI of Digma Plugin, by clicking on 'Digma' at the left-bottom corner in the Intellij
Now you can browse to class (shortcut Ctrl + N) OwnerController
and you should see something like that:
where LOCAL is your local environment, and the list contains linkable methods within this class.
as an example for Insights you can click on findOwner
method and you should see something like that: