Skip to content

jhendrick/tutorial-java-workshop

Repository files navigation

Live Debugging tutorial for debugging Java applications

A sample app for debugging Java code using Dynatrace

For the simplest setup, use with GitHub codespaces. Docker in Docker is configured so the Java application can be started within the codespace. Port 8080 is exposed in order to access the application from your local machine. The steps below follow the guide for deploying OneAgent with application only monitoring

Setup

  1. Clone the sample app from this repository or spin up an environment using codespaces:
git clone https://github.com/jhendrick/tutorial-java-workshop.git
cd tutorial-java-workshop

Note, even if you use codespaces, you will need to clone the repository locally in order to connect the source code repo later in the live debugger.

  1. Update the Dockerfile with your Dynatrace environment URL and custom label
For example: <environmentURL> could be {environmentID}.live.dynatrace.com
ENV DT_LIVEDEBUGGER_LABELS=name:value
  1. # to Docker with your Dynatrace environment ID as username.
docker login <environmentURL> -u <environmentID>
  1. Enter your <PAAS_TOKEN> when prompted.

  2. Build and run the app

docker build -t tutorial-java-workshop .
docker run -p 8080:8080 tutorial-java-workshop
  1. Open the app at http://localhost:8080

  2. You can set a breakpoint in TodoController.java on line 32 or anywhere in the addTodo() function

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published